date functions

J

Judy

I'm trying to count the number of rows in a column for
each month of the year--it's a date/time data type, and I
tried the 'DATEPART' SQL function but Access doesn't seem
to recognize that.

How do you do a criteria to convert 7/1/03 to just 7,
then count the rows? Or is there a simpler way to get all
the rows each each month counted?

thanks!
 
J

John Vinson

How do you do a criteria to convert 7/1/03 to just 7,
then count the rows?

Put a calculated field in the query by typing

MonthNum: Month([datefield])

in a vacant Field cell; make it a Totals query and group by this
field.
 

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