I have been searching for an hour and still cannot get my columns to be weeks (M-Sunday) based on a date field. I am using CR 9. I have tried to modify the following formula from the BO website, which is F-T, but it doesn't work.
if dayofweek({Table.Field}) = [1,2,3,4,5] then
(numbervar x := (-(dayofweek({Table.Field}) + 1));
(dateadd("d", x, {Table.Field})))
else
if dayofweek({Table.Field})=6 then
({Table.Field})
else
if dayofweek({Table.Field})=7 then
(dateadd("d", -1 ,{Table.Field}))
I need the report to group by M-Sunday and show the date of the Monday ie:
October 25 (contains all dates from 25th - 31)
November 1 (contains all dates from Nov 1-7
November 8
if dayofweek({Table.Field}) = [1,2,3,4,5] then
(numbervar x := (-(dayofweek({Table.Field}) + 1));
(dateadd("d", x, {Table.Field})))
else
if dayofweek({Table.Field})=6 then
({Table.Field})
else
if dayofweek({Table.Field})=7 then
(dateadd("d", -1 ,{Table.Field}))
I need the report to group by M-Sunday and show the date of the Monday ie:
October 25 (contains all dates from 25th - 31)
November 1 (contains all dates from Nov 1-7
November 8