Filtering data with dates that have not been reached this year.

vas90

New member
Local time
Today, 08:22
Joined
Aug 4, 2010
Messages
7
Hello, I'm having some trouble finding/ building an expression to do this.
I have 2 years worth of data (2009 and 2010) in query1. Each record has a unique date in the [date completed] field.
We have only reached 8-11-2010 this year.
I need to filter query1 such that
1. all current year to date records are displayed in the query.
2. all previous year's records are displayed up to the current date.
Example: Records shown in query.
All records with date less than 8-11-2010
All records with date less than 8-11-2009

Any expression to accomplish this? Thanks in advance.
 
One way ...
Code:
WHERE Month(DateCompleted) < Month(Date())
  OR ( 
    Month(DateCompleted) = Month(Date())
    AND Day(DateCompleted) <= Day(Date()) 
  )
 
Worked beautifully! Thank you so much.
 

Users who are viewing this thread

Back
Top Bottom