Kirill Bondar 11/24/2010 9:51:50 AM We do not group by week since the week starts on different days in different countries. While start day can be calculated from user's settings, it may introduce inconsistency with reports: users from different countries may see different date.
However, TeamDesk introduces periods.
You may consider week a period of 7 days starting on Sunday/Monday/any other day, and then calculate the beginning of the period. The view then groups by that date.
TeamDesk provides two functions for this:
FirstDayOfPeriod(<date>, <duration>, <start>) calculates the first day of the period that falls on specified date, starts on <start> date with selected duration.
In terms of week, it expressed as:
FirstDayOfPeriod(<date>, Days(7), Date(2006, 1, 1)), assuming the week started on Sunday, or FirstDayOfPeriod(<date>, Days(7), Date(2007, 1, 1)), assuming the week started on Monday.
There is no magic in a last date parameter, it can be any date that falls on a start of a week.
There is also a LastDayOfPeriod() function - the counterpart to FirstDayOfPeriod().
To build the report, create a Formula - Date column that will calculate beginning of the week that falls on a date, and then group by this column.
|