Calcdate?

can anybody help me with a line of code? using this command is it possible to go back 6 calender months, from a date variable? Thanks

Of course: NewDate := CALCDATE('-6M',MyDate);

newdatevar := (CALCDATE(’-6M’, datevar);

Thanks for your help, I was doing newdate := calcdate(’-m6’.mydate); Which was throwing up an error!!

NewDate := CALCDATE(’<-6M>’,MyDate); (international CALCDATE use from 2.01b to 3.70)

But you will usually find CALCDATE is used as: NewDate := CALCDATE(MyDateFormula,MyDate); where DateFormula is a variable or field of the DateFormula data type. On older versions, before Navision introduced the DateFormula, they used a Code field with the property DateFormula set to TRUE to store formulas in the database. Check the first table in Object Designer - “Payment Terms” - on the various versions.

Mank Thanks