05-05-2011 05:03 AM
hi,
i am making a report that should be automatically show the shift name.
from every daya morning
6:30AM to 11:30 AM = shift A
12:00PM to 3:30 PM= shift B
4:00PM to 9:00 PM= Shift C
10:00PM to 1:00AM = Shift D
2:00 AM to 5:00 AM = Shift C
how to configure like this, and how to change the shift name while this time changing?
05-05-2011 05:15 AM - edited 05-05-2011 05:15 AM
Hi!
I would have used "Get Date/Time" function to see what time your computer's clock is. Then I would have checked if the time was within your limits. Based on that, a local Variable can easily be changed to contain your "Shift Name".
05-05-2011 05:56 AM
YES I DONE....
05-05-2011 07:05 AM - edited 05-05-2011 07:06 AM
Well, your code works fine. The only problem I see, is when the time is between your shifts, the code should put something else. I.e "Lunchbreak" or something. Or you would have to remove these timespaces where your code cannot find anyting to put in your "Shiftname".
Example:
1200 - 1300 = Shift A
1301 - 1359 = Break After Shift A
1400 - 1500 = Shift B
1501 - 1529 = Break After Shift B
Or just include your breaks in shift A, like:
1200 - 1359 = Shift A
1400 - 1530 = shift B