Query Date from current months first day to one year ago

G

Guest

I am using a make table query to limit a rather large table of sales history.

I want the new tables results to include sales history from the current day
back to the same month's first day one year ago. I have tried
=DateSerial(Year(Date()),Month(Date())-12,1)
But I don't seem to get the results I want.

My current date field is in yyyy-mm-dd format

If July 10th 2005 is the current day I would like to have the following
results

between #2005-07-10# and #2004-07-01#
 
M

Marshall Barton

Michael said:
I am using a make table query to limit a rather large table of sales history.

I want the new tables results to include sales history from the current day
back to the same month's first day one year ago. I have tried
But I don't seem to get the results I want.

My current date field is in yyyy-mm-dd format

If July 10th 2005 is the current day I would like to have the following
results

between #2005-07-10# and #2004-07-01#


I would have used:
DateSerial(Year(Date()) - 1, Month(Date()), 1)

but it seems like what you have should also work.

What do you mean by "don't seem to get the results I want"?
 

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