I am not an SQL programmer but run reports that were made by someone else. I have been asked to modify a report to only show data from between 8am to 6pm. The report is for the previous months data and currently has this
where DateTime > DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE())-1, 0) AND DateTime < DATEADD(MONTH, DATEDIFF(MONTH, -1, GETDATE())-1, 0)
What do i need to add/change to only get 8am to 6pm data ?