ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

IDEA: convert time

(1/1)

lullabylin:
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/converter/decimal-time.htm

jgpaiva:
Here's a possible solution:


--- ---;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%
}
Just paste that in notepad, save it as ConvertTime.ahk, download and install autohotkey and double-click ConvertTime.ahk ;)

lullabylin:
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 ...  :tellme:

jgpaiva:
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 ;)

Navigation

[0] Message Index

Go to full version