d0n Posted July 30, 2009 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))
monoceres Posted July 30, 2009 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!
d0n Posted July 30, 2009 Author Posted July 30, 2009 ah yes Mod() was the function i was looking for >_
Xand3r Posted July 30, 2009 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
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