SkyHog
Touchdown! Greaser!
- Joined
- Feb 23, 2005
- Messages
- 18,431
- Location
- Castle Rock, CO
- Display Name
Display name:
Everything Offends Me
......
Last edited:
close but not quiteHours=MOD(Insecs,3600)
LeftSecs=Insecs-Hours*3600
Minutes=MOD(LeftSecs,60)
Seconds=LeftSecs-Minutes*60
close but not quite
hours = floor(insecs/3600) note floor might be call (int)
leftSecs = mod(insecs,3600)
minutes = floor(leftSecs/60)
seconds is fine.
Joe
Ah I see. You could have just googled "php convert seconds to hours minutes" and found about a billion code examples...Some really nice powerful time classes out there.I was doing it in php. Just needed the basic knowledge of what math to do.
I am the king of google, man.
Converting degrees, minutes, and seconds to decimal degrees, or vice versa, is just the same as converting hours, minutes, and seconds to decimal hours.I actually did that, and found a bunch of examples that were either wrong, or were trying to convert lat/long.