# Group by month in Access Query



## dee5782 (Apr 19, 2007)

See below the rough example of two columns of data pulled from a crosstab query which i am using. I'd like to group the dates by month for each number instead of having it list each day. Can i do this grouping in the query?

Ex: What i've got now

51351 12/1/2006
51351 12/3/2006
51351 1/4/2007
51351 1/16/2007
51333 12/1/2006
51333 12/3/2006
51333 12/4/2006
51333 1/17/2007
51333 1/18/2007


What i would like to get:

51351 12/2006
51351 1/2007
51333 12/2006
51333 1/2007

Thanks in advance for your help!


----------



## Ziggy1 (Jun 18, 2002)

Expr1: Format([YourDatefield],"m/yyyy")

or

Use the Month and YEAR functions

Expr1:Month(yourDatefield)

Expr2:YEAR(yourDatefield)


----------



## dee5782 (Apr 19, 2007)

Great, thanks!


----------

