Cole100
asked on
DateDiff function pulling wrong time duration
In my query Im attempting to calculate the exact time duration from clockin to clockout
I'm using this function to calculate the Duration field:
Duration: DateDiff("h"[clock_in_date time],[clo ck_out_dat etime])
The output for this is round numbers. Is this avoidable? I need the increments as well.
Clock_In_Datetime Clock_Out_Datetime Duration
9/3/2008 2:25:00 PM 9/3/2008 7:27:00 PM 5.00
9/3/2008 5:00:00 PM 9/3/2008 7:39:00 PM 2.0
9/3/2008 5:03:00 PM 9/3/2008 8:22:00 PM 3.00
9/3/2008 5:13:00 PM 9/3/2008 8:27:00 PM 3.00
9/3/2008 6:35:00 PM 9/3/2008 10:14:00 PM 4.00
9/3/2008 8:11:00 PM 9/4/2008 1:34:00 AM 5.00
thanks
I'm using this function to calculate the Duration field:
Duration: DateDiff("h"[clock_in_date
The output for this is round numbers. Is this avoidable? I need the increments as well.
Clock_In_Datetime Clock_Out_Datetime Duration
9/3/2008 2:25:00 PM 9/3/2008 7:27:00 PM 5.00
9/3/2008 5:00:00 PM 9/3/2008 7:39:00 PM 2.0
9/3/2008 5:03:00 PM 9/3/2008 8:22:00 PM 3.00
9/3/2008 5:13:00 PM 9/3/2008 8:27:00 PM 3.00
9/3/2008 6:35:00 PM 9/3/2008 10:14:00 PM 4.00
9/3/2008 8:11:00 PM 9/4/2008 1:34:00 AM 5.00
thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Using "n" gets total minutes. I need hours rounded to the .1
clockin clockout duration (hrs)
4:00pm 8:30pm 4.5
thank you.
clockin clockout duration (hrs)
4:00pm 8:30pm 4.5
thank you.
ASKER
dportas:
I should have caught that. Thanks very much. That got it.
I should have caught that. Thanks very much. That got it.
You can use minutes "n"
http://www.techonthenet.com/access/functions/date/datediff.php
Good Luck!
Gary