Convert SmallDateTime question
Posted on 2008-11-17
I want to return all the records less than a cetain date(MM/dd/yyy). I thought the following query would do that but it does not. The query returns a record for 01/09/2009 which is grater than 11/18/2008.
where Convert(varchar(10),EndDt,101) < '11/16/2008'
This returns 01/02/2009.
I chose to use the convert function in the where because I want to ignore hour, minutes and seconds. Would someone please explain why this query returns a record which seems to be incorrect.