I am trying to calculate the difference between the start time of a job and the finish time. I am using the following:-
Dim worked As Date
worked = DateDiff("h", [startTime], [finishTime]) / 24
Which is fine when the time worked is a full hour. Some jobs can be 30 minutes though and using the above code it will only calculate full hours. i.e. - start time is 14:00 and finish time is 14:30, it will show calculate "worked" as 01:00 hour.
Any tips on how to solve this? Thanks
Dim worked As Date
worked = DateDiff("h", [startTime], [finishTime]) / 24
Which is fine when the time worked is a full hour. Some jobs can be 30 minutes though and using the above code it will only calculate full hours. i.e. - start time is 14:00 and finish time is 14:30, it will show calculate "worked" as 01:00 hour.
Any tips on how to solve this? Thanks