|
marc,
Assuming you have a
date type field, DateDiff() function applied with reference to first of the
year, should get you week of the year.
Sample
query grouping the sales on weekly basis is give below. In table
T_Data, fields named SDate and Qty represent date of sale and quantity
sold respectively. (first week
starts on first of the year).
Best wishes,
A.D.Tejpal
===================================
SELECT
DateDiff("ww",DateSerial(Year([SDate]),1,1),([SDate]+1)) AS SaleWeek,
Sum(T_Data.Qty) AS SoldInWeek
FROM T_Data GROUP BY DateDiff("ww",DateSerial(Year([SDate]),1,1),([SDate]+1)); ===================================
Please zip all files prior to uploading to Files section.
SPONSORED LINKS
YAHOO! GROUPS LINKS
|
- [AccessDevelopers] Group by week marcslists
- Re: [AccessDevelopers] Group by week Manuel Tejada
- [AccessDevelopers] Re: Group by week Pete Harrison
- RE: [AccessDevelopers] Re: Group by week Gavin Cragg
- [AccessDevelopers] Retrieving table's na... Manuel Tejada
- Re: [AccessDevelopers] Retrieving ta... Michael Essen
- Re: [AccessDevelopers] Retrieving ta... hal_mcgee
- Re: [AccessDevelopers] Retrievi... Manuel Tejada
- Re: [AccessDevelopers] Group by week A.D.Tejpal
- [AccessDevelopers] Re: Group by week J. Mitchell Grossack
- Re: [AccessDevelopers] Re: Group by week A.D.Tejpal
- [AccessDevelopers] Re: Group by week J. Mitchell Grossack
