SQL server datetime column filter on certain date or range of dates
- by MicMit
There is an example for today here
http://stackoverflow.com/questions/2583228/get-row-where-datetime-column-today-sql-server-noob
I am primarily interested in 2008 only. For today it looked like
SELECT (list of fields)
FROM dbo.YourTable
WHERE dateValue BETWEEN
CAST(GETDATE() AS DATE) AND DATEADD(DAY, 1, CAST(GETDATE() AS DATE))
What…