posted 16 years ago
I have witten SQL query as:
"Select * from tbl where date between 'Jan 2 2008' and 'Feb 28 2008'";
Records in table are:
Name Date
aaa Jan 5 2008
bbb Jan 26 2008
ccc Jan 26 2008
ddd Feb 27 2008
Now when I run this query I get only last record i.e
ddd Feb 27 2008
When I run query as
"Select * from tbl where date between 'Jan 1 2008' and 'Jan 31 2008'";
I get all records inculding Feb ones ie
Name Date
aaa Jan 5 2008
bbb Jan 26 2008
ccc Jan 26 2008
ddd Feb 27 2008
I'm using MS Access db and I have kept date field with Text data type
I'm not getting why this problem is occuring.
Please help
thank you.