Jump to content
Sign in to follow this  
huldu

Math question

Recommended Posts

huldu

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!!!"

Share this post


Link to post
Share on other sites
DemonAngel

Try something like this.

$value = 125
$mins = int($value / 60)
$Secs = $value - ($mins * 60)

MsgBox(0,"",$mins &" Mins")
MsgBox(0,"",$Secs &" Secs")
Edited by DemonAngel

Share this post


Link to post
Share on other sites
huldu

Thank you very much guys.


"I'm paper, rock is fine, nerf scissors!!!"

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×