The query below should only be pulling records from March of 2005. Instead it pulls records from March 2004 and March 2005. Why?
select *
from tablename
WHERE Convert(char(12), date_submitted, 101) BETWEEN '03/01/2005' AND '03/31/2005'
However, if I switch and use format 111 it works? I could just use this one, but I don't understand why the above query will not work. Any help would be appreciated.
select *
from tablename
WHERE Convert(char(12), date_submitted, 111) BETWEEN '2005/03/01' AND '2005/03/31'
select *
from tablename
WHERE Convert(char(12), date_submitted, 101) BETWEEN '03/01/2005' AND '03/31/2005'
However, if I switch and use format 111 it works? I could just use this one, but I don't understand why the above query will not work. Any help would be appreciated.
select *
from tablename
WHERE Convert(char(12), date_submitted, 111) BETWEEN '2005/03/01' AND '2005/03/31'