View Full Version : return a date range


aoswald
01-20-2009, 06:46 AM
What forumla do I use to return entries one week on either side of today's date:

thanks

pbaldy
01-20-2009, 06:49 AM
You should find functions here to find the relevant dates:

http://www.pacificdb.com.au/Support/code_datetime.htm

allan57
01-20-2009, 06:50 AM
DateAdd("ww", -1, Now()) = Minus one week
DateAdd("ww", 1, Now()) = Add one week

aoswald
01-20-2009, 06:56 AM
allan57
do I just put that formula in the criteria field
if yes - it didn't work

allan57
01-20-2009, 07:33 AM
Place this in the criteria

Between DateAdd("ww",-1,Now()) And DateAdd("ww",1,Now())

Brianwarnock
01-20-2009, 08:25 AM
The danger of using Now() instead of Date() is that it adds time into the mix, Date() defaults to 00:00:00.


Brian