• Your problem is that you have not restricted the times as you wanted to.

    You're asking for values between 12/15/2013 17:00:00 and 12/21/2013 08:00:00 not between 12/15/2013 and 12/21/2013 only where the time is between 5:00PM and 8:00AM.

    You need to add another condition to the where clause that only looks at the time portion of the date and restrict that to only times between 5:00PM and 8:00AM.



    Alvin Ramard
    Memphis PASS Chapter[/url]

    All my SSC forum answers come with a money back guarantee. If you didn't like the answer then I'll gladly refund what you paid for it.

    For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]