The twelve months

  • Thread starter Thread starter Floyd Forbes
  • Start date Start date
SELECT * FROM tablename WHERE somedatefield Between Date()-365 And Date().

DateAdd, DateDiff, DatePart, Month, and Format can assist as well.
 
Hi, How do you only show the last twelve months in a query expression?

Floyd

Use a criterion of

BETWEEN DateAdd("m", -12, Date()) AND Date()

This will give you the past twelve months to the day - that is, if
it's run on January 19 2005, it will give you all records from
midnight, January 19, 2004 up to midnight at the beginning of January
19, 2005.

John W. Vinson[MVP]
 

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