Query help, date criteria

  • Thread starter Thread starter androide016
  • Start date Start date
A

androide016

Hi everyone,

Im newbie with access, how do I create a query that only report the records
in a specific month? BTW the table that i have records have a field of date
in format mm/dd/yy, i dont have any field with just the month.
Any help will be appreciated. thanks in advance
 
e.g. this would give you records for December:

SELECT * FROM some_table WHERE Month(some_date) = 12
 
Hi everyone,

Im newbie with access, how do I create a query that only report the records
in a specific month? BTW the table that i have records have a field of date
in format mm/dd/yy, i dont have any field with just the month.
Any help will be appreciated. thanks in advance

You don't need a field that stores just the month, and the format of
the [datefield] is not important.

I'll assume you want just one month for a specific year as well, not
all years.

There are several ways to do this. Here is one.

Add a new column to the query grid.

ForPeriod:Format([DateField],"mm/yyyy")

Then as criteria for this column, write:
[What month and year mm/yyyy]

Enter 11/2006 for all November 2006 records.
 

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

Back
Top