Sign in to follow this  
Followers 0
huldu

Math question

4 posts in this topic

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



#3 ·  Posted (edited)

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

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  
Followers 0