A
access_learner via AccessMonster.com
Hi,
I am not able to get the correct total hours worked when the date/time passes
into next morning.
I am using this formula--> Hours_Worked: DateDiff("n",[Day_0_Start],
[Day_0_Stop])/60
This formula gives correct hours for Employee #2.
But for #1 it gives -3495.5. Employee 1 works from March 31 starting at 23:
00:00 and finishes the following morning at April 1 at 7:30:00.
Here is the sample output:
Employee DAY_0_START DAY_0_STOP
Hours_Worked
1 03/31/2010 23:00:00 04/01/2010 07:30:00
-3495.5
2 03/31/2010 13:30:00 03/31/2010 22:15:00
8.75
I have searched DateDiff on Access Monster as well as Google but nothing
seems to make sense that will explain how to do calculation when employee
works into next morning.
Can someone please provide detailed solution using Access 2003 that will
allow me to calculate the correct number of hours regardless of when the
employee starts or finishes their shift which includes working into next
morning.
Looking forward to early reply.
Thank you.
I am not able to get the correct total hours worked when the date/time passes
into next morning.
I am using this formula--> Hours_Worked: DateDiff("n",[Day_0_Start],
[Day_0_Stop])/60
This formula gives correct hours for Employee #2.
But for #1 it gives -3495.5. Employee 1 works from March 31 starting at 23:
00:00 and finishes the following morning at April 1 at 7:30:00.
Here is the sample output:
Employee DAY_0_START DAY_0_STOP
Hours_Worked
1 03/31/2010 23:00:00 04/01/2010 07:30:00
-3495.5
2 03/31/2010 13:30:00 03/31/2010 22:15:00
8.75
I have searched DateDiff on Access Monster as well as Google but nothing
seems to make sense that will explain how to do calculation when employee
works into next morning.
Can someone please provide detailed solution using Access 2003 that will
allow me to calculate the correct number of hours regardless of when the
employee starts or finishes their shift which includes working into next
morning.
Looking forward to early reply.
Thank you.