Dateserial question

L

Liz Taylor

Hi,

I'm struggling with this one, simply because I just don't understand it all
yet... So, I'm hoping someone could set me straight.

I need to look at dates between 10/01/02 through today's date minus one
year... So if I look at the numbers today I would see data between 10/01/02
and 1/13/03.

I have the following which will give me 10/01/02 through today's date. How
do I modify this to show 10/01/02 through today's date minus one year...

Between DateSerial(IIf(Month(Date())<10,Year(Date())-1,Year(Date())),10,1)
And Date()

Thanks!!

Liz
 
B

Brian Camire

You might try:

Between DateSerial(2002, 10, 1) And DateAdd("yyyy", -1, Date())

This assumes that the current date is after October 1, 2003, and that the
field you're using this expression as a criteria for is a Date/Time field
that does not have a time of day component.
 
F

fredg

You might try:

Between DateSerial(2002, 10, 1) And DateAdd("yyyy", -1, Date())

This assumes that the current date is after October 1, 2003, and that the
field you're using this expression as a criteria for is a Date/Time field
that does not have a time of day component.
Between #10/1/2002# and DateAdd("yyyy",-1,Date())
 
L

Liz Taylor

Thanks. It works.

:)


Brian Camire said:
You might try:

Between DateSerial(2002, 10, 1) And DateAdd("yyyy", -1, Date())

This assumes that the current date is after October 1, 2003, and that the
field you're using this expression as a criteria for is a Date/Time field
that does not have a time of day component.
 

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