Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

query by month

Status
Not open for further replies.

diggadave

Programmer
Jun 22, 2003
9
GB
Hi Guys

I have a date field in one of my tables, and I would like to run a query on it where the month will be selected in a form, and data returned only for that month.

I have been looking at the query builder screens, and noticed there is a built in month function, however I am not too sure how to build the query for it.

Any help will be greatly appreciated.

Digga
 
Hey digga,

Something like:

select * from mytable where month([myfield])=[select month]

Mike Pastore

Hats off to (Roy) Harper
 
Don't really want to use sql statement.

Was just looking to use the query builder in access, where I set the criteria on the date column equal to a number for example 6 (for June)

But, I need somehow to tell access to display only those dates where the month is equal to 6....how?

Best Wishes

Digga
 
K, got it sorted....easier to go for the sql after all

Thanks for your help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top