1

I am trying to create a query on a table that filters out dates. I need to display all records previous to a specific date, but need this to be dynamically updated annually.

Specifically, I need to find dates prior to October 1 of the previous year. (i.e. anything prior to Oct 1, 2012.) I know I can use '<#10/1/2012#' but would like to make this dynamic to update every year, as this same function will be utilized for multiple queries.

I have tried several iterations of the Date() function to get this to work, to no avail. Things that don't work are...

Year([TrainingDate])

4

1 回答 1

2
[TrainingDate] < DateSerial(Year(Date())-1,10,1)

Date()是当前日期,Year(Date())当年也是。

于 2013-07-30T15:24:58.770 回答