How to find differnce between two dates

  • Hi to all i have a query how to find the result between two shifts.

    like one shift is start from 06:00am to 2:00pm and other shift is start from 3:00 to 11:00 pm ............................ so i want to put a check that 2nd shift timming is always greater than first shift timming...................

  • Not enough information to really help.

    Read the article at http://qa.sqlservercentral.com/articles/Best+Practices/61537/ and follow the instructions on what information to post and how to post it. The more information you provide, the better answers you will get.

  • mahinder.singh.chauhan (4/18/2012)


    Hi to all i have a query how to find the result between two shifts.

    like one shift is start from 06:00am to 2:00pm and other shift is start from 3:00 to 11:00 pm ............................ so i want to put a check that 2nd shift timming is always greater than first shift timming...................

    In addition to posting some test data as requested, please clarify what your definition of "greater than" means. In other words, in your world how is that determined? Is it that the start time for 2nd shift is later in the day than the start time for the 1st shift? Or, is it that the start time for 2nd shift is after the end time for 1st shift? Or...?

    We need to know the rules of the road before we can help you drive 🙂

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • thanks to all for reply. i got the solution................god bless you

Viewing 4 posts - 1 through 3 (of 3 total)

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