Find records where a date is less than 120 days

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I am trying to create a query where I can get all records that are 120 days
past a date. I tried running a query where the date criteria for a
DateReceived is:

date()<120

But that did not work. Does anyone have a suggestion?

Thanks,
Lisa
 
Your criteria should be < date() + 120.

That will return all records where DateReceived is at least 120 days before
today.
 
If you want Records whose ReceivedDate is more than 120 days old, i.e.
w.r.t. today, then use:

< DateAdd("d", -120, Date())

in the criteria row of the "DateReceived" Column.
 
Hello,

I am trying to create a query where I can get all records that are 120 days
past a date. I tried running a query where the date criteria for a
DateReceived is:

date()<120

But that did not work. Does anyone have a suggestion?

This will find all records where the date field is equal to December
30, 1899, and I doubt you have any such! The reason is that the
expression

Date() < 120

is a FALSE expression; 120 corresponds to a Date/Time value of April
20, 1900. FALSE is expressed as the number 0 (True is -1) so the
criterion becomes the date corresponding to 0, which is #12/30/1899#.

Try a criterion of

<= DateAdd("d", -120, Date())

on DateReceived.

John W. Vinson[MVP]
 
Back
Top