Previous Month expression (1 Viewer)

AnnPhil

Registered User.
Local time
Today, 11:19
Joined
Dec 18, 2001
Messages
246
How do you have a date field return the previous month data?

For example i have a date field and the criteris needs to be all days from the previous month. So if i was running this Jan 31, 2011, i need it to return me all records that have a date between Dec 1, 2010 and Dec 31, 2010.

Next month i run it on February 29, 2011 and i need it to return me all records that have a date between Jan 1, 2011 and Jan 31, 2011.

Thanks in advance for any help on this!
 

boblarson

Smeghead
Local time
Today, 03:19
Joined
Jan 12, 2001
Messages
32,059
It would be like this:

Between DateSerial(Year(Date()), Month(Date())-1, 1) And DateSerial(Year(Date()), Month(Date()), 0)
 

AnnPhil

Registered User.
Local time
Today, 11:19
Joined
Dec 18, 2001
Messages
246
Thanks, works great!:)
 

Users who are viewing this thread

Top Bottom