Forum Discussion

DougStutzman's avatar
DougStutzman
Qrew Member
5 years ago

Automatically calculating shifts based on 23 hr shift times

Hello,

I currently am working with several forms which will require me to automatically calculate shift times based on date created field (Date/Time). Ultimately, I would like to do two things with this formula - 1. automatically calculate based on shifts (1)07:00-15:00, (2) 15:00-23:00, and (3) 23:00 to 07:00 and change the date over at 11 pm (23:00) to nexts day date rather then at midnight.

Here is the formula I have been working with so far - the issue I am having so far is that (3) shift wont calculate and show up. 1 and 2 shift work perfectly - but 3 does not. It shows up as blank on the report.

Case(true,
Hour(ToTimeOfDay([Date Created]))>6 and Hour(ToTimeOfDay([Date Created])) <15,1,
Hour(ToTimeOfDay([Date Created]))>14 and Hour(ToTimeOfDay([Date Created])) <23,2,
Hour(ToTimeOfDay([Date Created]))>22 and Hour(ToTimeOfDay([Date Created])) <7,3)

------------------------------
Doug Stutzman
------------------------------
No RepliesBe the first to reply