G
Guest
Here is my SQL I am trying to create in a query. THe objective is to find
the time an employee start work and end work. the problem lies when they
start work very late like 11pm and end work the next day at 9am or 7am or
10am. THe result I got is not correct. Could anyone help me with this?
UPDATE TimeCard2 SET TimeCard2.OT_HRS = IIf([OverNight]=Yes,("#" &
(CDbl([DateEntered])+1) & [END_WORK] & "#"-"#" & [DateEntered] & [SCHD_START]
& "#"),[END_WORK]-[SCHD_START])
WHERE (((TimeCard2.SCHD_START) Is Not Null) AND ((TimeCard2.BEG_WORK) Is Not
Null) AND ((TimeCard2.END_WORK) Is Not Null) AND ((TimeCard2.BASE_HRS) Is Not
Null));
the time an employee start work and end work. the problem lies when they
start work very late like 11pm and end work the next day at 9am or 7am or
10am. THe result I got is not correct. Could anyone help me with this?
UPDATE TimeCard2 SET TimeCard2.OT_HRS = IIf([OverNight]=Yes,("#" &
(CDbl([DateEntered])+1) & [END_WORK] & "#"-"#" & [DateEntered] & [SCHD_START]
& "#"),[END_WORK]-[SCHD_START])
WHERE (((TimeCard2.SCHD_START) Is Not Null) AND ((TimeCard2.BEG_WORK) Is Not
Null) AND ((TimeCard2.END_WORK) Is Not Null) AND ((TimeCard2.BASE_HRS) Is Not
Null));