Comparing one set of data to another

R

Rab

I have a set of data that I serach by date [enter start date] and [enter end
date]. It returns the data I need which is costs. What I would like to do is
after entering the start and end dates to also pull data for the exact same
time period the previous year. For example:

1/1/2009 to 7/1/2009

X $5.00
X $10.00

Compare that data to

1/1/2008 to 1/1/2008

X $2.00
X $15.00

The time periods may be 1 month, 6 months, or a year. Any ideas
 
P

Phil Smith

Look at thet DateAdd() function. UseDateAdd, with "yyyy" for the
interval, and -1 for the number, and it will subtract one year fron the
given date.
 
R

Rab

I tried it with my criteria for searching between the two dates and it came
back without any data. I used [enter start date] AND [enter end date] AND
DateAdd("yyyy", -1, [Acc Date])

Phil Smith said:
Look at thet DateAdd() function. UseDateAdd, with "yyyy" for the
interval, and -1 for the number, and it will subtract one year fron the
given date.

I have a set of data that I serach by date [enter start date] and [enter end
date]. It returns the data I need which is costs. What I would like to do is
after entering the start and end dates to also pull data for the exact same
time period the previous year. For example:

1/1/2009 to 7/1/2009

X $5.00
X $10.00

Compare that data to

1/1/2008 to 1/1/2008

X $2.00
X $15.00

The time periods may be 1 month, 6 months, or a year. Any ideas
 

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