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!
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
5 Replies
- NikolinoDEGold Contributor
Here is a small additional example with file
.....although in hindsight, I like Sergei's example better...recommend it :))🙂
- gmarko11Copper ContributorSometimes I work from 02.44 to 12.00 or from 16.00 to 03.58 ...
- SergeiBaklanDiamond Contributor
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
- gmarko11Copper ContributorThank you Sergei!!