Hi, I use convert(varchar(10), date, 1) in a lot of my select statements to easily select all rows for a particular date, but when I use a date in 2003, I do not get any rows back. For example:
select * from enrollment where convert(char(10), add_dt, 1) between '12/01/02' and '01/06/03'
Returns NO rows, BUT
select * from enrollment where add_dt between '12/01/02' and '01/06/03'
does return data. This is a CRITICAL problem for me, as I have about 25 automated jobs that run every night that use this syntax to select the data to act upon. ANY help would be greatly appreciated!!!
Thanks,
Birgit
select * from enrollment where convert(char(10), add_dt, 1) between '12/01/02' and '01/06/03'
Returns NO rows, BUT
select * from enrollment where add_dt between '12/01/02' and '01/06/03'
does return data. This is a CRITICAL problem for me, as I have about 25 automated jobs that run every night that use this syntax to select the data to act upon. ANY help would be greatly appreciated!!!
Thanks,
Birgit