d0n Posted July 30, 2009 Share Posted July 30, 2009 say i have 950 seconds what would be the best way to get that in minute and seconds this is what i have, is there a better way to do this? $sec = 950 Floor($sec/60)&":"&Ceiling(StringTrimLeft($sec/60,2)*60)) Link to comment Share on other sites More sharing options...
monoceres Posted July 30, 2009 Share Posted July 30, 2009 I believe this is cleaner. $input=950 $sec=Mod($input,60) $min=($input-$sec)/60 MsgBox(0,$input,$min&":"&$sec) Broken link? PM me and I'll send you the file! Link to comment Share on other sites More sharing options...
d0n Posted July 30, 2009 Author Share Posted July 30, 2009 ah yes Mod() was the function i was looking for >_ Link to comment Share on other sites More sharing options...
Xand3r Posted July 30, 2009 Share Posted July 30, 2009 or.. $sec = 950 $ticks=$sec*1000 global $hours,$mins,$secs _TicksToTime($ticks,$hours,$mins,$secs) Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now