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]
 
Back
Top