Sign in to follow this  
Followers 0
compact21

Simple calculator

3 posts in this topic

$math=InputBox("Math", "Insert the values:")
$exec=Execute($math)
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



#2 ·  Posted (edited)

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
typo
1 person likes this

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

Great, thank you!

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