Setting weekly date range

J

jmk

I would like to have my report sort weekly, but I need it to show the actual
date, ie, Week of 10/23/05, not just the week number since the beginning of
the year.

How can I do this?

Thank you
 
O

Ofer

In the record source of the report, you display both fields, but in the
sorting and grouping select only the new field WeekNum, and sort the report
by this field

Select DateField , DatePart("ww",[DateField]) as WeekNum From TableName
 
B

Bob Miller

I assume you have data that you want to do something like add all th
sales for week 2 of 2005, week 3 of 2005, etc. You however don't wan
1, 2, etc but 1/9/2005, 1/16/2005, etc to head your rows.
Here is SQL for a query that will do that:
SELECT DISTINCTROW Min(Table.[Dater]) AS [MinOfDate]
Sum(Table.TotalPrice) AS [Sum Of TotalPrice]
FROM Table
GROUP BY Format([Dater],"ww");
 
Top