View Full Version : group by year, not month and day


Lia80
09-22-2009, 01:52 AM
Hi,

Ive forgot how to group by only year....:mad:

In my query I want to sum all data from ex 2009. But the date are set 2009-01-02... how do I split the date?

So in my table I have data från 1966-2009 with several data on each year. I want to group them together by year so that i can get an average/per year. I want to do it without changing the query between every year... I want it to go as automatic as possible :)

thanks

Lia

DCrake
09-22-2009, 01:58 AM
If you add a new column in your query

Yr:Year([YourDatefield])

Then group by this column you will get subtotals for each years activity.

David

ajetrumpet
09-22-2009, 01:59 AM
this explanation is really tough to read. got a sample that the expertrs can look at to better grasps what you want?