Querie: Dates

E

emmy128

Hi,

How do i only select records for 1 month at a time in a querie.

i have an august querie with this formula under criteria, <#8/31/2004#

but its also selcting the previous months.....how do i make it only show
records between august 1 - august 31??

Help!

Thanks, Cheers.
 
D

Dirk Goldgar

emmy128 said:
Hi,

How do i only select records for 1 month at a time in a querie.

i have an august querie with this formula under criteria, <#8/31/2004#

but its also selcting the previous months.....how do i make it only
show records between august 1 - august 31??

Help!

Thanks, Cheers.

... WHERE YourDateField Between #8/1/2004# AND #8/31/2004#

will work if your data field contains only dates, with no time portion.
If it might contain a time, you'd better use this instead:

... WHERE YourDateField >= #8/1/2004# AND YourDateField < #9/1/2004#
 
Top