> I first use Paul's formula to get the number of months between two dates.
> So, this will give me my counter for the FOR NEXT. I also start with the
> highest date.
>
> FOR lnCounter=1 TO lnNumberMonths
>
> Then, I can do a count for the number of messages from the highest date.
>
> COUNT FOR ADDDATE>=ldDate2 AND ADDDATE<=GOMONTH(ldDate2,1)-1 TO lnMessage
>
> Then, after my processing, for the next FOR loop, I need to remove one
> month from the highest date.
>
> ldDate2=GoMonth(ldDate2,-1)
>
> And, the loop continues...
Well, both solutions are (written :) quick. BTW, shouldn't "addate
between this and that" be faster than "adddate <= this and
adddate>=that)"? Not only for writing, but considering SQL. Anyone
measured this?