Query using DateAdd & specified date

  • Thread starter Thread starter Angela
  • Start date Start date
A

Angela

Hi,

I'm trying to run a date query using the DateAdd expression.
My query is as follows:
Between [date required:] And DateAdd("m",-12,"Date[date
specified]")
I received a pop up advising that this expression is typed
incorrectly or too complex to be evaluated. I'm pretty sure
it's the first one :-)

Basically, I need to be able to run a query which prompts
the user to enter a date and the query will search for all
relevant records between the date entered and 12 months
prior to that date. I know I could have two prompts and the
users could enter the dates themselves, but I was hoping to
make it simple for them to use.

Can anyone help me out? Thanks!
 
Hi Angela,
Could you get away with using:
between ([date required] - 365) and [date required]
Just a thought.
Dave
 
Thanks! Works a treat :)

-----Original Message-----
Try

Between DateAdd("m",-12,[date required:] And [date required:]

Hi,

I'm trying to run a date query using the DateAdd expression.
My query is as follows:
Between [date required:] And DateAdd("m",-12,"Date[date
specified]")
I received a pop up advising that this expression is typed
incorrectly or too complex to be evaluated. I'm pretty sure
it's the first one :-)

Basically, I need to be able to run a query which prompts
the user to enter a date and the query will search for all
relevant records between the date entered and 12 months
prior to that date. I know I could have two prompts and the
users could enter the dates themselves, but I was hoping to
make it simple for them to use.

Can anyone help me out? Thanks!
.
 
Back
Top