RE: Query date and time data
> select * from test where chkdate between '20040106' and dateadd(s, -1, '20040107')This might work with smalldatetime values, but it will possibly exclude some datetime values for that date. See my predicates using >= and < rather than BETWEEN.> select * from test where dbo.Dateonly(chkdate) = '2004-01-06'Three problems with this:By using a conversion style that uses only two digits […]
2004-01-28
1 reads