I'm working on an analysis related to working shift strucutre. We operate 12 hours per shift. Meaning we work from 7am-7pm (Day shift, D) and 7pm - 7am (Night shift, N).
Currently I have a formula column script as follows:
"WW" || Char (Week of Year (:date)) || "." || Char (Day of week (:date) - 1) ||
If (Hour (:date) <= 19 & Hour(:date) >= 7, "D", "N")
Seems like it doesnt work the way I expected bcs based on this script, it changed to new day whenever the time reached 12am.
For example:
The script will convert 12/01/2020 5:49:47 AM to WW49.2N. It should be WW49.1N. WW49.2D starts when the date and time is 12/01/2020 7:00:00 AM This is because the time for night shift is from 7pm-7am. Can someone suggest or advise an alternative way to create the script?