Thanks for the comments, but I disagree,
Quote:
>> GLO:LastMonth = CON:BaseDate + ((TODAY() - CON:BaseDate) / 28 - 1) * 28
>>This code works fine,
>> Month# = ((TODAY() - CON:BaseDate) / 28 - 1)
>> GLO:LastMonth = CON:BaseDate + 28 * MONTH#
>Con:BaseDate plus month# multiplied by 28 isn't quite the same as
>Con:BaseDate plus 28 multiplied by month#, is it?
Yes it is, the order is irrelevant, maths operators are done in a strict
hierarchy, (power and %, then * and / and finally + and - ).
Quote:
>Also, in the first example, your month calc inside the parentheses
>resolves to an intermediate floating point value whereas in your
>second example you are resolving it to an integer. This will also
>allow for the possibility of dissimilar results.
In my desperation I did try
GLO:LastMonth = CON:BaseDate + (INT((TODAY() - CON:BaseDate) / 28) - 1) * 28
and it made no difference.
Quote:
>Regards,
>Brett C. Cammack