compact21 Posted February 24, 2016 Share Posted February 24, 2016 $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? Link to comment Share on other sites More sharing options...
JohnQSmith Posted February 24, 2016 Share Posted February 24, 2016 (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 February 24, 2016 by JohnQSmith typo compact21 1 Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes". Link to comment Share on other sites More sharing options...
compact21 Posted February 24, 2016 Author Share Posted February 24, 2016 Great, thank you! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now