Jump to content

Recommended Posts

Posted
$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?

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

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...