F
Fluke
Hi
I understand variations of this question have been asked numerous times, and
I've read them, but none seem to be exactly what I'm after.
I need to calculate hours worked between a start time and an end time.
Seems simple. Then the hours for each day are added for the weekly total.
I've tried a few different options such as...
Sun1:
IIf(IsNull([Name1]),"",Format(([tblTimesheet2]![N1SunOut]-[tblTimesheet2]![N1SunIn])*24,"##.0"))
Or
Mon1:
IIf(IsNull([Name1]),"",DateDiff("n",[tblTimesheet2]![N1MonIn],[tblTimesheet2]![N1MonOut])/60-0.5)
The second one has the -0.5 because, during the week, half an hour is taken
off for lunch. I seemed to have it working so, during the week, if the start
time is 08:30 and the end time is 16:30, it gives 7.5 hours worked. And a
weekend would give 8. But I put in, for the Sunday, 10:45 start and 15:15
end, expecting 4.5 and it gave 5. And when i put that someone started at
10:20 one day, it threw it completely.
Can anyone help please?
I understand variations of this question have been asked numerous times, and
I've read them, but none seem to be exactly what I'm after.
I need to calculate hours worked between a start time and an end time.
Seems simple. Then the hours for each day are added for the weekly total.
I've tried a few different options such as...
Sun1:
IIf(IsNull([Name1]),"",Format(([tblTimesheet2]![N1SunOut]-[tblTimesheet2]![N1SunIn])*24,"##.0"))
Or
Mon1:
IIf(IsNull([Name1]),"",DateDiff("n",[tblTimesheet2]![N1MonIn],[tblTimesheet2]![N1MonOut])/60-0.5)
The second one has the -0.5 because, during the week, half an hour is taken
off for lunch. I seemed to have it working so, during the week, if the start
time is 08:30 and the end time is 16:30, it gives 7.5 hours worked. And a
weekend would give 8. But I put in, for the Sunday, 10:45 start and 15:15
end, expecting 4.5 and it gave 5. And when i put that someone started at
10:20 one day, it threw it completely.
Can anyone help please?