DateAdd Function Return Range of Records?


M

Matt

I have a weekly report that pulls out total number of orders from the
previous week using the DateAdd function:

=Sum(IIf(((([Date_Requested]) Between DateAdd("d",-7,Date()) And
Date())),1,0))

I would like to add to my report a list of the total orders that were
ordered two weeks ago through one week ago. I think it should look something
like this:

=Sum(IIf(((([Date_Requested]) Between DateAdd("d",-14,Date()) And
DateAdd("d",-7))),1,0))

but unfortunately I am getting a message telling me I entered a function
containing the wrong number of arguments.

Any suggestions?
 
Ad

Advertisements

M

Matt

I think I figured it out as this appears to give me what I want:

=Sum(IIf(((([Date_Requested]) Between DateAdd("d",-14,Date()) And
DateAdd("d",-7,Date()))),1,0))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top