query selecting items between two dates

C

Clay Forbes

I need a query that will select records from a table if the To date is
between june and august. What should i put under criteria?
 
J

John Spencer (MVP)

Of the current year (2004)?

BETWEEN #6/1/2004# and #8/31/2004#

Of all years in the table? Then you would need a calculated field and apply
criteria against that calculated field.

Field: MonthNum Month([Yourtable].[YourDatefield])
Criteria: In (6,7,8)

SQL
SELECT *
FROM Table
WHERE Month(DateField) in (6,7,8)
 

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