January 12, 200718 yr Here's a weird question, the customer had fm7.... We have a time log for truck fuel fillings. All I want to do is look at the time, and if it's before 6am or after 6pm, flag a warning. I've written all kinds of permutations like: Case (if (time) < 06:00;"Time Warning";if (time) > 18:00;"Time Warning";"" and it doesn't work right, i can't figure out a rhyme or reason why some come up with warnings and some don't the times seem all over the place, oh and (time) is a valid time field.... what obvious stupid thing am i doing wrong? I even tried it with just one comparison, and it is still all over the place.... help -John
January 12, 200718 yr Something like this: Case (time < GetAsTime("6:00 am");"Time Warning"; time > GetAsTime("6:00 pm");"Time Warning"; .... If() requires multiple arguments and isn't needed here, but you need to convert the '06:00' to real times before comparing them.
January 12, 200718 yr Not sure what a one field warning of Time is going to do, but try this Case ( Time < Time ( 6 ; 0 ; 0 ) or Time > Time ( 18 ; 0 ; 0 ); "Warning" ) HTH Lee
Create an account or sign in to comment