I'm trying to add labels to timestamps. I would like any time from 04:45 to 16:44 to be labeled DAYS for day shift. Any time from 16:45 to 04:44 to be labeled NIGHTS for night shift. I was able to get my formula to work for 05:00 to 17:00 because I only entered hours. Now that I want to add minutes my formula does not work.
DateTimeHour([Date and Time_Act])
DateTimeMinutes([Date and Time_Act])
IIF(([Hour_Act]<4 AND [Minute_Act]>44)
OR ([Hour_Act]>16 AND [Minute_Act]>44),
"NIGHTS","DAYS"))
Solved! Go to Solution.
Hi @adarchuk
I think you have an extra parenthesis at the end. Try this
IIF(([Hour_Act]<4 AND [Minute_Act]>44)
OR ([Hour_Act]>16 AND [Minute_Act]>44),
"NIGHTS","DAYS")
Such a simple solution! Thanks for your help.