Forum Discussion
gmarko11
Mar 19, 2022Copper Contributor
Night shift
Hi, I have a question ... how can a night shift be calculated automatically? I work from 9.30 pm to the second day at 9.30 am and at night I get paid $ 2 more between 10 pm and 6 am!
- Mar 19, 2022
Here
it could be
day shift: =IF( D2 < C2, IF(C2>$A$1, 0, $A$1-C2) - IF(D2<$A$2,0, $A$2-D2), MIN(D2,$A$1) - MAX($A$2,C2) ) total: =MOD(D2-C2,1) night shift: =G2-E2
NikolinoDE
Mar 19, 2022Gold Contributor
Here is a small additional example with file
.....although in hindsight, I like Sergei's example better...recommend it :))🙂