Jump to content

Recommended Posts

Posted

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))
Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...