RussellBeaubien
6 years agoQrew Cadet
auto calculate lunch break
I'm having a bit of a problem with writing this formula.
When an employee completes a daily Time card to record their hours the select the project and times they worked.
Example:
Date Name Project Start Time Finish Time Total Hours
9/12/2019 John D. 0001 6am 8am 2
9/12/2019 John D. 0007 8am 3pm 7
9/12/2019 John D. 0004 3pm 5pm 2
As you can see John worked on multiple projects in one day. This information is important for two reasons; 1)Hours for how much to pay the employee, and 2) how much expense is being charged to that project.
So, I am trying to auto assign lunch to the correct spot. Lunch break is required if you work more then 5 hours in a day.
this is my formula
if([Start Time]<12 & [Finish Time]>12 & ToHours([Finish Time]-[Start Time])>5,
ToHours([Finish Time]-[Start Time])-.5 & [Lunch]=1,
ToHours([Finish Time]-[Start Time])
)
[Lunch] is a checkbox
------------------------------
Russell Beaubien
------------------------------
When an employee completes a daily Time card to record their hours the select the project and times they worked.
Example:
Date Name Project Start Time Finish Time Total Hours
9/12/2019 John D. 0001 6am 8am 2
9/12/2019 John D. 0007 8am 3pm 7
9/12/2019 John D. 0004 3pm 5pm 2
As you can see John worked on multiple projects in one day. This information is important for two reasons; 1)Hours for how much to pay the employee, and 2) how much expense is being charged to that project.
So, I am trying to auto assign lunch to the correct spot. Lunch break is required if you work more then 5 hours in a day.
this is my formula
if([Start Time]<12 & [Finish Time]>12 & ToHours([Finish Time]-[Start Time])>5,
ToHours([Finish Time]-[Start Time])-.5 & [Lunch]=1,
ToHours([Finish Time]-[Start Time])
)
[Lunch] is a checkbox
------------------------------
Russell Beaubien
------------------------------