group by week (M-Su)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I group the records in my report by week starting on Monday (e.g. M
7/11-Su 7/17) instead of starting on Sunday?
 
Heather said:
How do I group the records in my report by week starting on Monday (e.g. M
7/11-Su 7/17) instead of starting on Sunday?

Group on an expression like:

=DatePart("ww", yourdatefield, 2)

The 2 specifies Monday as the week start date. See Help for
details.
 
Marshall, I have an additional but pertinent question. Is it possible to
alter the "starting week" for the year to reflect a fiscal calendar instead
of a standard calendar?
The code that I am using looks like this:
SELECT DatePart("ww",[sentdate],1) AS Week, Count(tbl_mytable.sentdate) AS
CountOfnum
FROM tbl_mytable
GROUP BY DatePart("ww",[sentdate],1);

I know that if I do not specify that constant for the <firstweekofyear>
argument that it defaults to the week that has January 1st.
Is there a way to have the function start at say October 1st instead? This
would synchronize the week number count that I have as a result with the
fiscal calendar that we use.
TIA
 
Back
Top