AutoHotkey Community

It is currently May 25th, 2012, 1:15 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: July 27th, 2007, 7:52 am 
Offline

Joined: July 24th, 2007, 10:05 am
Posts: 20
i have a variable with a value that's 42.967633 and i want to show this value in a variable in the mm:ss format. so the result would be 42:58...

what is the way to do it?

many thanks for your help.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 27th, 2007, 8:35 am 
Quote:
what is the way to do it?
Math.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 27th, 2007, 8:57 am 
Offline

Joined: July 24th, 2007, 10:05 am
Posts: 20
very helpful....

i know it's math but i'd like to know, if there is a function like FormatTime supporting a convertion like this...

thanks anyway.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 27th, 2007, 9:33 am 
Quote:
is there a function like FormatTime supporting a convertion like this...
Thanks to be more specific. Check out the Scripts & Functions Section. I guess I've seen something which fits (optionally slight changes necessary). Good luck. 8)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 27th, 2007, 4:48 pm 
Offline

Joined: July 24th, 2007, 10:05 am
Posts: 20
thanks.

do you have a search string? because if i search for date AND converting i get about 20 pages of results...


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Min/Sec Problem
PostPosted: July 27th, 2007, 6:31 pm 
Offline

Joined: July 6th, 2004, 10:07 am
Posts: 171
Location: Manchester, England.
@gr8

Code:

v:=42.967633,m:=Floor(v)
s:=Floor((v-m)*60)

MsgBox % m ":" s



OR as a Func

Code:

MsgBox % MinSec(42.967633)


MinSec(_Dmin)
{
m:=Floor(_DMin)
Return % m ":" Floor((_DMin-m)*60)
}



Regards Dave.

_________________
Simple ideas lie within reach, only of complex minds


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 27th, 2007, 10:10 pm 
Offline

Joined: July 24th, 2007, 10:05 am
Posts: 20
@dave

many thanks for your help. thats the perfect solution!


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google Feedfetcher, KenC, krajan, locos, Pulover and 20 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group