Custom date ranges for report groups

K

kidkosmo

Hi, All,

I'm trying to create a timesheet report. We pay out from 1st of the
month to the 15th and the 15th to the end of the month. Rather than
grouping by standard week (Sunday thru Saturday) I'd like my report to
group by Week 1 as 1st thru 8th, Week 2 as 9-16 Week 3 as 17-24, Week
4 as 25-end of month (which, of course, can be 7 or less days
depending on the month).

Any ideas? (besides shoot the director who created that rule?)
 
A

Allen Browne

Try typing an expression like this into the Field row in query design:
WeekNo: (Day([d]) - 1) \ 8
replacing d with your date/time field name.

That should divide the month up for you.
 
Top