retrieving previous year and month

M

Miskacee

I have a group of dates that I would like to retrieve those dates that =
previous year and current month. I have the following in a query:
=DateSerial(Year(Date())-1,Month(Date()),1)

I'm only getting the first day of the month instead of the entire current
month.

Any suggestions?
Thank you!
 
D

Douglas J. Steele

To get an entire month, you need to give a range with a Begin and End:

BETWEEN DateSerial(Year(Date())-1,Month(Date()),1) AND
DateSerial(Year(Date())-1,Month(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