Ok, I have a question that seems basic, but I am having major issues. I need to compare the following date/times. Basically I need to select from a table where the date range is between '12/15/2013' and '12/21/2013' and time is BETWEEN 5:00PM and 8:00AM. I cannot seem to get this working.
Here is what I have... INTERVALSTART is in the following format (datetime): '2013-12-15 18:30:00.000'.
Any help is greatly appreciated.
SELECT sum(abncalls), INTERVALSTART
WHERE INTERVALSTART >= '12/15/2013 17:00:00.000' AND INTERVALSTART <= '12/21/2013 08:00:00.000'