Dates and Huge error message

Hi everyone,

I got the attached huge error message while compiling my page…
I got the page by Form Transformation using the TIF tool…
The code of the original form uses a lot the CALCDATE function, but I really don’t know what to do since the form compiles and works very fine

How to correct that???

The calls to the CALCDATE function are almost like this:

IF Period= 2 THEN TestDate := CALCDATE( '+2'+Portion+'+FM', DatePreced )
ELSE TestDate := CALCDATE( '+1'+Portion+'+FM', DatePreced );

What seems to cause this big error???

it says you cant convert an integer to dateformula so what is “portion” supposed to equal (a “D” or “M”)?

Has ‘FM’ caused you issues? Have you tried ‘’ instead?

Yes, you are right about Portion, it is ‘M’ or ‘Q’ or ‘Y’…

and yes, I tought about using ‘’ but this didn’t change anything…the error is still here…

Maybe you can try it by assigning the formula first to a text variable

FormulaTxt := ‘<+1’+Portion+’+CM>’;
NewDate := CALCDATE(FormulaTxt,OldDate);

or a variable of type DateFormula

EVALUATE(MyDateFormula,’<+1’+Portion+’+CM>’);
NewDate := CALCDATE(MyDateFormula,OldDate);

Not sure if it helps but I believe having seen something similar before.