Jump to content
Sign in to follow this  

Simple calculator

Recommended Posts

$math=InputBox("Math", "Insert the values:")
MsgBox("Math", Default, $exec)

Hello, could you please help me, this is my code, i want to return the results in time units.

If you try 530/110 it will return 4,81818... but i need the result like:4 hours and x minutes. Can this be done?

Share this post

Link to post
Share on other sites

Multiply the fractional part by 60 to get minutes, then the fractional part of that to get seconds.

.81818 * 60 = 49.0908   ~  49 minutes

.0908 * 60 = 5.448 seconds

Edited by JohnQSmith
  • Like 1

Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.