Using Mod to Generate Work Shifts

  • That is a great idea. Thanks for the post

  • This is interesting. How did you come up with this?

  • Right you are. It is fairly specific for their needs.

  • I like the idea of removing the case. It is something I will remember in the future. Thanks for the idea.

  • I have not used the ABS function but that seems like a great use of it.

  • It is not bullet proof for sure and it is specific for them as their shifts stand today. But tomorrow they could easily decide to change it all up and this approach might not work.

  • I appreciate all the comments so far. It is great to be able to see the different ways to accomplish the same tasks. And I did end up making it a function :).

  • I will add a suggestion that you always use 1/1/1753 07:00 as the basedate. That way there is no need to worry about which date is larger. 🙂

    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • Good point.

  • The code could be very well be wrong. What would you suggest as a fix?

Viewing 10 posts - 16 through 24 (of 24 total)

You must be logged in to reply to this topic. Login to reply