gadsystems Posted January 12, 2007 Posted January 12, 2007 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
The Shadow Posted January 12, 2007 Posted January 12, 2007 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.
Lee Smith Posted January 12, 2007 Posted January 12, 2007 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
Recommended Posts
This topic is 6586 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now