### Title

Trouble with Time Calculation

### Post

Hello,

I believe what I'm trying to do should be fairly simple, and I've used several templates and the help file to double-check my work, yet I'm still not getting the desired results. This is easy:

- I have a "Time" field that is an auto-enter calculation that grabs the time from a timestamp upon import. This WORKS and I have verified the data in this field to be in the correct time format (24hour).
- I have a Calculation field where I'm trying to calculate what time of day the Time field is. I've attached a screenshot of this calculation for your reference.

Currently all of the records/times are producing result number 1, "Morning". No matter what I put in I only get the first result back. I've tried formatting my equation any and every way I can think of with no luck. Why does this not work? Any help is greatly appreciated!

T1

<Created_Time < T2 is incorrect syntax. Rewrite it to be:T1

<Created_Time AND Created_Time < T2but you can simplify the case function's expression further by writing it like this:

Case (

Created_Time < T1 ; "Other" ;

Created_Time < T2 ; "Morning" ;

Created_Time < T3 ; "Afternoon" ;

"Evening"

)

Case functions go with the first expression to evaluate as true so as long as you test the field against ever larger or ever smaller values, you don't have to use the full range expression each time.

Note that the times T0 and T4 are not needed. Time ( 0 ; 0 ; 0 ) is the smallest value a time field can have and Time ( 23 ; 59 ; 59 ) is the largest possible creation time that might be auto-entered.