How do create a query that groups by weeks? (not a report)

How do create a query that groups by weeks? (not a report)

Post by TWFudWVsIF » Sun, 29 Oct 2006 02:06:02


I am trying to agregate date on weekly basis. I have a data base where I
track shortages on daily basis. I would like to be able to run a query that
will look at the total shortages by week.

I know the Querie wizzard allows you do it monthly or yearly but I cannot
figure it out weekly. Can any one help me out?

Thank you
Manuel
 
 
 

How do create a query that groups by weeks? (not a report)

Post by S0FSTCBERV » Sun, 29 Oct 2006 02:21:02

Group on Format([YourDateField],"yyyymm") and turn off the display.

Use this in the second Group By to display the week date. To adjust which
day of the week you will display as the "Week commencing date" change the
number in the formula. The '+2' puts the Monday date as first day of the
week.

[Date_Received]-Format([Date_Received],"w")+2

 
 
 

How do create a query that groups by weeks? (not a report)

Post by SmVmZiB » Sun, 29 Oct 2006 04:14:01

Another approach:

Format([Your Date Field],"ww")
--
Jeff C
Live Well .. Be Happy In All You Do