Have a look at Format property. NAV help has lots of examples for FORMAT property:
In your case you can use the syntax: format(today,0,'<Day,2>.<Month,2>.<Year>')
CalcDate takes a date variable as the second parameter, not a text.
Use DMY2Date, in combination with your Day, Month and Year variables ( but make then integers ) to make a proper date, THEN use calcdate.
[edit]Extra tip : use < > around a dateformula. That way it is not language dependent.
Comments
In your case you can use the syntax: format(today,0,'<Day,2>.<Month,2>.<Year>')
Pargesoft
DateString := STRSUBSTNO('%1%2%3',DAY,MONTH,YEAR);
"Starting Date" := CALCDATE('15M',FORMAT(DateString,0,2));
Definition:
Text: DAY, MONTH, YEAR
and the information is coming from three text boxes.
This code seeks to calculate the 15 months from a specified date
Use DMY2Date, in combination with your Day, Month and Year variables ( but make then integers ) to make a proper date, THEN use calcdate.
[edit]Extra tip : use < > around a dateformula. That way it is not language dependent.
It worked perfectly