Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

15 shift back

  hello i have date from that i want to calculate current shift like system date is 4/3/2018 2:47pm is current time and then find out that shift from Shift Timing ================= Shif...
  • stefans2403's avatar
    8 years ago

    You need to calculate start time of current shift using GETDATE() and IF statement.

     

    From there, it's easy to calculate shift order using start time of current shift -8 hours,-16 hours,-24 hours, etc. again using IF statement.