
1. Re: Trouble with Time Calculation
philmodjunk Sep 23, 2013 1:25 PM (in response to Atkins)T1 < Created_Time < T2 is incorrect syntax. Rewrite it to be:
T1 < Created_Time AND Created_Time < T2
but 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 autoentered.

2. Re: Trouble with Time Calculation
Atkins Sep 23, 2013 2:40 PM (in response to Atkins)Works like a charm! Thanks for the helpful tips. It's always good to learn something, especially a simpler way of doing things...
Is there a good place to reference syntax issues like the one I had? The way I was writing it was a logical mathematical formula, but it makes sense that FileMaker doesn't like that syntax. How would I have known that? I had already looked through the Help pages for Time ( ) functions, etc...
Thanks again!