gregorytan Posted January 21, 2009 Share 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 Link to comment Share on other sites More sharing options...
Søren Dyhr Posted January 21, 2009 Share 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 Link to comment Share on other sites More sharing options...
gregorytan Posted January 21, 2009 Author Share Posted January 21, 2009 Hi Søren Dyhr's Thanks for you help. Both work fine for me. gregory Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 5545 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