Date criteria in a query

  • Thread starter Thread starter Skylight Steve
  • Start date Start date
S

Skylight Steve

What criteria can I use to limit a query to a date I enter minus 14 days?
What I'm trying to do is pull entries from 2 weeks prior to a date I enter.
I tried

Between [enter end date] and -14

I assume it's the -14 that's incorrect.

Thanks in advance
 
Between [enter end date] And DateAdd("d",-14,[enter end date])

Note that this will give a period containing 15 days. If you only want 14
days, change the -14 to -13.

HTH,

Rob
 
Between [enter end date] and [enter end date]-14

It will not prompt you twice, barring misspelling the parameter. Use Tools /
Parameters to explicitly specify that the parameter is a date.
 
Thanks that's a big help

Rob Parker said:
Between [enter end date] And DateAdd("d",-14,[enter end date])

Note that this will give a period containing 15 days. If you only want 14
days, change the -14 to -13.

HTH,

Rob

Skylight said:
What criteria can I use to limit a query to a date I enter minus 14
days? What I'm trying to do is pull entries from 2 weeks prior to a
date I enter. I tried

Between [enter end date] and -14

I assume it's the -14 that's incorrect.

Thanks in advance
 
Back
Top