Hi,
in Navision help under the topic "Using Date Formulas" you can read for example:
10D 10 days from today
When entering these formulas in date fields I get the error message "10d is not a valid date".
What am I doing wrong?
I also tried different languages (10t in German for example)
0
Comments
This formula should be used in fields of type "DateFormula".
You are trying to enter the formula in a "Date" field, that's why you are geting the error.
The Dateformula (propertie or Variable) is used to calculate an date.
Here an example
Calcformula := 'CQ+1M-10D'; // Current quarter + 1 month - 10 days
//German Version: LQ+1M+10T (L -> Laufender, T -> Tage
TheDate := 14082007D;;
CalculatedDate := CALCDATE(Calcformula,TheDate);
MESSAGE('Datum = %1',CalculatedDate);
Displayed: 20.10.2007
Regards
to make your calculation fully multilanguage use this :
Calcformula := '<CQ+1M-10D>';
So if I want to fill a datefield with the date "today in 60 days" I must add a second field of the type Dateformula which calculates the correct date and insert this date in the datefield afterwards?
WORKDATE - 10
TODAY - 10
MyDate := 010107
MyDate + 10
David
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com