I have a field that is date time field, using that field I need to determine what shift a person worked.
I was thinking about using an IF statement to determine based on the time, what shift a person worked.
I used this formula to convert the field to Time
TimeValue ({lwmain.dtrepor})
Then I tried to write an IF statement to determine the shift. This is a separate formula from the above. Or maybe it should all be one statement.
IF {lwmain.dtrepor} between 06:00 to 13:59 then "I" or
IF {lwmain.dtrepor} between 14:00 to 21:59 then "II" or
IF {lwmain.dtrepor} between 22:00 to 23:59 then "III" or
IF {lwmain.dtrepor} between 00:01 to 05:59 then "III"
But it errors out and I am unsure how to make it use the time only and then do the If then statement.
Any help is appreciated.