Solved
How to calculate total hours and minutes between two time? (Urgent)
Posted on 2002-03-28
In my form, it has two text box that i set its format to ##:## using MaskEdit.
These two textboxes are for user to key in time.
From 01:00 To 11:15
When user click the calculate button, program will calculate the time. This is use to calculate total working hours.
The result.. should be 10:15, right? how to do this? any VB function can calculate this directly?
I used DateDiff function to calculate and return in minutes but the result not accurate. If not mistaken, it return 1 hours for this.
I have to save the calculation result in 10.15 (numberic field) so that i can use it to calculate total salary. 10.15 means 10 hours + 10 minutes.
I know the design is not good.. any good suggestion?
I have to save the total hours in numberic data type because in other forms, i used SQL to calculate total salary. if save in string, the result will not accurate.
Please tell me how to solve this problem, thanks.