With the notation '03/12/2004' the SQL Server never knows what is the day value and what is the month value.
When you use '3 dec 2004' or '12 mar 2004' it works better.
I believe SQL Server uses the american notation. The format MM/DD/YYYY has to work also. But I always use the month format of above.
jan
feb
mar
apr
may
jun
jul
aug
sep
oct
nov
dec
Main Topics
Browse All Topics





by: KarinLoosPosted on 2005-01-03 at 08:08:09ID: 12944395
try 04')
select * from tblstudents where classID='1' and studentstartdate between convert(datetime, 12/03/2004') and convert(datetime, '12/03/2004')
(ie mm dd yyy )
or
set dateformat dmy
select * from tblstudents where classID='1' and studentstartdate between convert(datetime, '03/12/2004') and convert(datetime,'03/12/20