Set Dateformula using code

the_boy_wonderthe_boy_wonder Member Posts: 8
I am trying to give a field, which is a dateformula, a value via code
FieldName := 3M;

When I compile is get

Type conversion not possible becuase 1 one of the operators contains an invalid type.

DateFormula := integer;


How can I set the value?

Thanks

Answers

  • Stef-BStef-B Member Posts: 26
    Use

    EVALUATE(FieldName,'3M');

    instead.
  • the_boy_wonderthe_boy_wonder Member Posts: 8
    That worked, thanks
  • MBergerMBerger Member Posts: 413
    Tip : put <> around dataformulas in code, that way they are always interpreted in English, and you won't have problems with multilanguage.
Sign In or Register to comment.