Create a Date Query

G

Guest

I am a basic user. I am Tracking Training records and need to receate a query
that will find a dates in a field which meet the following critera:
have expired:more than a year from current date
Which will be due within 6 months
or contains a null value

(I am using the medium date format and Access 2000)
 
K

Ken Snell [MVP]

more than one year ago:

SELECT * FROM TableName
WHERE DateFieldName < DateAdd("yyyy", -1, Date());


due within six months from now:

SELECT * FROM TableName
WHERE DateFieldName Between Date() And DateAdd("m", 6, Date());


contains null value:

SELECT * FROM TableName
WHERE DateFieldName Is Null;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top