Jump to content

Recommended Posts

Posted

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

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

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...