Re: Date (Stupid Question)

From: Van T. Dinh (VanThien.Dinh_at_discussions.microsoft.com)
Date: 07/31/04


Date: Sat, 31 Jul 2004 11:30:24 +1000

This depends whether the DateField has non-zero time component or not. If
the Field stores date-only, you can use:

WHERE [DateField]
BETWEEN DateAdd("d", -7, Date()) AND Date()

If the Field stores non-zero time component, use:

WHERE [DateField]
BETWEEN DateAdd("d", -7, Date()) AND Now()

assuming you want Records up to now. If you want Records up to the end of
the day (23:59:59), use:

WHERE ([DateField] >= DateAdd("d", -7, Date()))
AND ([DateField] < DateAdd("d", 1, Date()))

-- 
HTH
Van T. Dinh
MVP (Access)
"Tim" <Timothy.Noone@usa.xerox.com> wrote in message
news:77ea01c4765e$49f1e710$a501280a@phx.gbl...
> This should be easy, but I've got "brainfreeze"....
> What's the correct syntax to get records with a date
> Between today and 7 days ago??
>