Jump to content
Sign in to follow this  
Necromorph

time difference

Recommended Posts

Necromorph

i have been trying to get this to work with no success, i have a gui with two controls $starttime and $endtime, and i need a function to read the difference between them. their time format is "hh:mm am/pm" no seconds, but i need to be able to calculate the difference between them ie: i started a task at 1:00PM and finished at 2:15PM and i need to do a GUICtrlSetData of another gui control the difference "1.25". you know i spent and hour and a quarter on the task. any help would be great. thanks in advanced!!

Share this post


Link to post
Share on other sites
wraithdu

None of the date/time functions work with am/pm type dates as input. You'll have to write your own function to convert that time into a 24-hr format, then you can use the standard date/time functions.

Edited by wraithdu

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.