gregorytan Posted January 21, 2009 Posted January 21, 2009 (edited) Hi I try to make a calulation on my record to show the input data is been key in on "Day Shift" or "Night Shift" Our Day Shift start on 0800hrs to 2000hrs and Night Shift start on 2000hrs to 0700hrs. I set my calculation as Case(08:0020:00 ; Day Shift : 20:0008:00 ; Night Shift) But not working How should i do it, Can anyone help. Thanks Thanks gregory Edited January 21, 2009 by Guest
Søren Dyhr Posted January 21, 2009 Posted January 21, 2009 You're forgetting the AND operator and by it screws up the syntactical rules... But you might apply some math instead and do it this way: Case(Abs(Hour ( theTime )-13,5) ≤ 5,5;"Dayshift";"Nightshift") ...whether or not it makes it more readable depends on you milage : --sd
gregorytan Posted January 21, 2009 Author Posted January 21, 2009 Hi Søren Dyhr's Thanks for you help. Both work fine for me. gregory
Recommended Posts
This topic is 5844 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