Hi,
I've got a news table in an Access database, with the following fields/datatypes:
I have a select statement from an ASP page like so:
What I need to be able to do, is to select all news articles from a particular year or all articles from a particular month, so the above statement needs to be something like this:
Clearly the above code doesn't work, since I'm passing a string into a date field, but this is the kind of thing I need to achieve.
Can this be done, and if so, how?
Thanks for any pointers...
I've got a news table in an Access database, with the following fields/datatypes:
Code:
=====
tblNews
=====
news_id (auto number)
news_headline (text field)
news_article (memo field)
news_date (date field)
I have a select statement from an ASP page like so:
Code:
SELECT * FROM tblNews ORDER BY news_date DESC;
What I need to be able to do, is to select all news articles from a particular year or all articles from a particular month, so the above statement needs to be something like this:
Code:
SELECT * FROM tblNews WHERE news_date = 'March' ORDER BY news_date DESC;
Clearly the above code doesn't work, since I'm passing a string into a date field, but this is the kind of thing I need to achieve.
Can this be done, and if so, how?
Thanks for any pointers...