I need to return a ticket count from 5PM on one day to 7am the following day. I tried using the following query using DATEADD but it isn't returning any results:
SELECT * FROM dbo.TicketIncidents
WHERE IncidentReportedDt BETWEEN
DATEADD(hh,17,CONVERT(VARCHAR(32), GETDATE(),110))
and DATEADD(hh,7,CONVERT(VARCHAR(32), GETDATE()+1,110))
does anyone have any suggestions to making this work? Your assistance is greatly appreciated.