I am trying to selected all columns upon a certain condition. That condition is that the datetimes must be between yesterday at 5:30pm and today at 6pm. My only question is how to I get the 5:30pm? I understood how to get 5pm but how would I add the minutes.
Here is the query that I am using based off of this post
SELECT *
FROM tbl
WHERE datelog BETWEEN dateadd(hour,17,datediff(day,1,GETDATE()))
AND dateadd(hour,18,datediff(day,0,GETDATE()))