Dear All,
I would like to be able to count an item to see how many were open items within a particular week.
So, I have a start date and a finish date for each item, and I want to count the items for each week that falls between these two dates.
I have the following (which I copied from the forums) and thought I'd modified correctly, but unfortunately do not really understand what I am doing.
- - - - - -
whileprintingrecords;
datetimevar MyDate:={Datecreated};
numbervar Counter;
numbervar array weekCount;
redim preserve weekCount [53];
For Counter := 1 to datediff("d",{Datecreated},{@Comp Date}) do
(
weekCount[datepart ("ww",(MyDate)-1,2,2)]:=weekCount[datepart ("ww",(MyDate)-1,2,2)]+1;
MyDate := MyDate+1;
);
- - - - - - -
Can anyone point me in the right direction. This is the first time I've needed to use an array.
Thanks
Sue
I would like to be able to count an item to see how many were open items within a particular week.
So, I have a start date and a finish date for each item, and I want to count the items for each week that falls between these two dates.
I have the following (which I copied from the forums) and thought I'd modified correctly, but unfortunately do not really understand what I am doing.
- - - - - -
whileprintingrecords;
datetimevar MyDate:={Datecreated};
numbervar Counter;
numbervar array weekCount;
redim preserve weekCount [53];
For Counter := 1 to datediff("d",{Datecreated},{@Comp Date}) do
(
weekCount[datepart ("ww",(MyDate)-1,2,2)]:=weekCount[datepart ("ww",(MyDate)-1,2,2)]+1;
MyDate := MyDate+1;
);
- - - - - - -
Can anyone point me in the right direction. This is the first time I've needed to use an array.
Thanks
Sue