Dateadd in a query

  • Thread starter Thread starter markwmiller via AccessMonster.com
  • Start date Start date
M

markwmiller via AccessMonster.com

I have a query that I want to find records 6 years old. How would I use the
dateadd function without any user input.
 
I have a query that I want to find records 6 years old. How would I use the
dateadd function without any user input.

Exactly 6 years to the day, ONLY?
as criteria on the date field column, write
DateAdd("yyyy",-6,Date())

More than 6 years from this day?
as criteria on the date field column, write
<=DateAdd("yyyy",-6,Date())
 
Thanks, I should have known that. Been a long week.
 

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

Back
Top