IDEA: convert time - DonationCoder.com
HOME | Blog | Software | Reviews and Features | Forum | Help | Donate
Welcome Guest. April 26, 2015, 04:44:01 AM

Or did you miss your validation email?

Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.

 You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 Your Support Funds this Site: View the Supporter Yearbook. Entire Forum This board This topic Members Help Desk Entire Site
Pages: [1]   Go Down
 Reply  |  New Topic  |  Print
 Author Topic: IDEA: convert time  (Read 2947 times)
lullabylin
Charter Member

Posts: 2

 « on: April 18, 2007, 09:36:45 AM »

Hi, I would LOVE to have a little widget that would enable conversion between TIME tracked in increments of sixty and increments of 100.
I have to keep track of media time (hours, minutes, seconds as shown in a standard media player) and time as a quantity in a spread sheet.

The spread sheet recognizes seconds as increments of a hundredth instead of increments of 1/60th.
A widget to convert back and forth from 100th's to 60th's would be SO SUPER!!!!!
LullabyLin

PS Here is a link to a page that has a conversion function like I'd like in a freestanding tool:  http://www.springfrog.com...onverter/decimal-time.htm
 « Last Edit: April 18, 2007, 10:07:12 AM by lullabylin » Logged
jgpaiva
Global Moderator

Posts: 4,724

Artificial Idiocy

 « Reply #1 on: April 18, 2007, 08:08:44 PM »

Here's a possible solution:

[copy or print]
;ConverTime
;By jgpaiva
;date: June 2006
;Function:

MsgBox,4,Hours/Minutes to Decimal?,Convert Hours`,Minutes and seconds to Decimal?`n  (select No to do the reverse operation)
IfMsgBox Yes
{
InputBox,Time,Input Time,Please input time in the following format: Hours:Minutes:Seconds
StringSplit,something,Time,`:,`:
if something0 <> 3
{
msgbox,wrong parameters
exitapp
}
result := something1 + something2 /60 + something3 / (60*60)
msgbox,% result
}
IfMsgBox No
{
InputBox,Time,Input Time,Please input time in the decimal format
hours := time // 1
minutes := ((time - hours) * 60) //1
seconds := ((time - hours - (minutes/60)) * 60 * 60) //1
msgbox,Hours: %hours%`nMinutes: %minutes%`nSeconds: %seconds%
}
 Logged

lullabylin
Charter Member

Posts: 2

 « Reply #2 on: April 18, 2007, 09:54:43 PM »

Thanks, JG.  I already use AHK and love it as a sort of typing expander.
So your widget is really neat but I am still scratching my head because I don't really want to convert the minutes and seconds to decimal as in a time clock decimal system of time.
I track time played of media files as a quantity in a spreadsheet that is then multiplied by an hourly rate.  If I multiply the total minutes and seconds by a number, I don't get the right thing because the quantity of seconds should be converted since it's based on a sixtieth and should be based on tens to be accurate.  Maybe I need to go back to 5th grade!!!!
Thank you very much for sharing your script.  I'm going to sleep on it and maybe insight will come ...
 Logged
jgpaiva
Global Moderator

Posts: 4,724

Artificial Idiocy

 « Reply #3 on: April 21, 2007, 06:35:45 AM »

Sorry but i don't quite get what you mean.
Notice that the script i made does exactly what the webpage you mentioned does.
To select the way the time is converted, you have to press yes or no at the beggining.
From what you described, i think that you pressed 'yes'. Try pressing 'no' at the beggining, and see if that's what you want
 Logged

Pages: [1]   Go Up
 Reply  |  New Topic  |  Print