dates and Between

G

GregB

I know I can set the critera in a query for dates to be like BETWEEN #date1#
AND #date2#

How can I make it so that it always returns results from the last two weeks?
BETWEEN #two weeks ago# AND #today#

Thanks
 
J

John Spencer

See if this gives you the results you want
Between DateAdd("ww",-2,Date()) and Date()

John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
 
D

Dirk Goldgar

GregB said:
I know I can set the critera in a query for dates to be like BETWEEN
#date1#
AND #date2#

How can I make it so that it always returns results from the last two
weeks?
BETWEEN #two weeks ago# AND #today#


If there are no future dates in this field, you could use
DateAdd("d",-14,Date())

Or you might want to us ">=" instead of ">"; it's not clear to me.
 

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