Pull Previous Month

S

SarahJ

I have a report where I need to pull month end numbers as well as the
previous month's numbers.

Here is what I am currently using for the month end:
Between DateSerial(Year(Date()), Month(Date())-1,1) AND
DateAdd("d",-Day(Date()), Date())

How do I get the previous month?
 
D

Duane Hookom

If you mean the month prior to the current month, try:

Between DateSerial(Year(Date()), Month(Date())-1,1) AND
(Date()-Day(Date()))
 
S

SarahJ

I want the month before that. So say it is Dec 1. I want to do a report
that has Nov data in one column, and Oct data in another. I used the
mentioned method to get Nov data. I need to figure out how to get Oct data.
Thanks for the help.
 
D

Duane Hookom

Try:
Between DateSerial(Year(Date()), Month(Date())-2,1) AND
DateSerial(Year(Date()), Month(Date())-1,0)
 
S

SarahJ

You are too good! :)

I really appreciate you guys helping out on the forums.....especially for a
newb like me who is trying to learn by the seat of my pants. :)
 
D

Duane Hookom

Most of us went through the newbie stage at some point. Others helped us get
through it.
 

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