I have a database column of type datetime.
I want to query the table to get the number of records between 2 sets of dates.
The problem is the last date part of the between statement ignores that date in the datetime field.
Here is my query
SELECT * FROM [Case] WHERE CAST(DATEADD(DAY,0,DataEntryDate) AS DATETIME) BETWEEN '2/2/2009' AND
So any dates that are on 2/12/2009 are skipped since their datetime is greater than 2/12/2009 such as 2/12/2009 10:11:04 AM etc.
How do I include that last date parameter in my results. I realize between should ignore the 2/12/2009 10:11:04 AM example. How do I fix it?
View Complete Post