Return only records with a date after the most recent September 1st I have a table with data with a date column called &quot;dtAssessmentDate&quot; in a table called &quot;tblAssessmentRecords&quot;. What I want to achieve is for a select query to return only the records from that table where the date value is after the last September 1st.
For example, if the current date is #27/02/2021# then the query would return the records with any date after #01/09/2020# as that was the most recent September 1st in the past.
I can do this for a record after a fixed date with:
[dtAssessmentDate] &gt; #01/09/2020#
but I need the fixed date to roll over as the years go on, so if the current date was 27/02/2022, the query would return records after #01/09/2021#
Answered my own question, leaving it here for refence for others as I couldn't find the solution anywhere else. By adding 4 months to the date from &quot;dtAssessmentDate&quot; I was able to make the range of values I needed to return as any date from a single year. I extracted the year I am looking for by doing the same 4 month addition to the current date, then using DatePart to exctract the year and only return records who's year matches the extracted year.
Expression in criteria box in access is:
DatePart(&quot;yyyy&quot;,DateAdd(&quot;m&quot;,4,[dtAssessmentDate]))=DatePart(&quot;yyyy&quot;,DateAdd(&quot;m&quot;,4,Date()))