Assigning Default value to Dateformula

How can I assign a default value to a variable with the datatype Dateformula?

If this is a table field depending on your regional setting you could set its “initialvalue” property to say 1D, or 1G for Turkish setting. If this is a only variable you could bound a control to this variable say a textbox then adjust its Dateformula property to yes. OnOpenForm assign the default value to this variable.

What abt codeunit?

You can use: <10D>

Dear Erik, I tried to assign d:=<10D>, but this is giving the compilation error - A value or an expression was expected.

EVALUATE(MyDateFormula,’<10D>’);

Thanks dear, Its working perfectly fine