Calculate "night shift" hours

Hello. I have a timecard app that captures hours worked via date/timestamp columns - "Clock In" & "Clock Out."

We recently implemented "night shift" pay where if an employee works any hours between 8pm and 4am they receive upgrade pay for those hours.

For example, if an employee works from 7am - 9pm, they'd be entitled to 1 hour of upgrade pay.  Work 8pm - 6am, they'd be entitled to 8 hours of upgrade pay.

I'm trying to figure out a way for the app to automatically calculate these night shift hours. I've looked through forum and documentation and can't quite get a handle on a starting point.

Any guidance is appreciated. Thanks!

Solved Solved
0 14 2,424
1 ACCEPTED SOLUTION

Oh yes, I overlooked this! However, don't convert with TIME() indiscriminately, and you have to leave both values as DateTime.

Instead do this:

This expression, with subtraction, should be left as is:

HOUR([Clock Out] - [Clock In])

Replace every HOUR([Clock In]) with:

HOUR([Clock In] -  DATE([Clock In]))

Similarly for [Clock OUT].

That would be sufficient. 

 

View solution in original post

14 REPLIES 14
Top Labels in this Space