I have the following sql server WHERE
clause:
WHERE (DateCreated >= CONVERT(datetime, GETDATE(), 111) - 1)
This gets the date (where today is 2015-06-09) 2015-06-08
. I need to add a time to this as well like 2015-06-08 04:00:00
in 24H format. the time will always be the same bat every time the SQL command is executed, it should only be from yesterday at 4 AM to the current date and time.
how can this be achieved?
Try this: