huldu Posted January 22, 2006 Posted January 22, 2006 This is probably really simple but i gotto ask, because i cant figure out the "formula". So im trying to figure out how to calculate seconds and convert it to minutes and seconds. The most simple math, 120/60 = 2 (so 2 minutes have passed). However how does the formula look when you have a more weird number, like 125 seconds and try to convert it to minutes and seconds? "I'm paper, rock is fine, nerf scissors!!!"
Developers Jos Posted January 22, 2006 Developers Posted January 22, 2006 $Sec = 150 $Min = Int($Sec / 60) $Sec = $Sec - $Min * 60 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
DemonAngel Posted January 22, 2006 Posted January 22, 2006 (edited) Try something like this. $value = 125 $mins = int($value / 60) $Secs = $value - ($mins * 60) MsgBox(0,"",$mins &" Mins") MsgBox(0,"",$Secs &" Secs") Edited January 22, 2006 by DemonAngel
huldu Posted January 22, 2006 Author Posted January 22, 2006 Thank you very much guys. "I'm paper, rock is fine, nerf scissors!!!"
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