grouping by month

C

Colin Basterfield

Hi,

I am trying to generate a query which groups by month, where the month has
to be extracted from a Date/Time field in a table, my knowledge of SQL is
good, but not how to achieve it in Access...

Any ideas?

TIA
Colin B
 
D

Duane Hookom

You can create a column in your query like:
YrMth: Format([YourField], "yyyymm")
Then group by this calculated column.
 
C

Colin Basterfield

Duane,

thanks for that, it works...

Colin B

Duane Hookom said:
You can create a column in your query like:
YrMth: Format([YourField], "yyyymm")
Then group by this calculated column.

--
Duane Hookom
MS Access MVP


Colin Basterfield said:
Hi,

I am trying to generate a query which groups by month, where the month has
to be extracted from a Date/Time field in a table, my knowledge of SQL is
good, but not how to achieve it in Access...

Any ideas?

TIA
Colin B
 
Top