Date Formulas

tentacle
Member Posts: 27
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)
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
-
Hi tentacle,
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.0 -
Hi, you will insert these fomula in an Date Field. Thats the mistake
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
RegardsDo you make it right, it works too!0 -
FYI :
to make your calculation fully multilanguage use this :
Calcformula := '<CQ+1M-10D>';0 -
thanks!
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?0 -
That's it !0
-
If you just want to add or take off days then you do not need to use calcdate.
WORKDATE - 10
TODAY - 10
MyDate := 010107
MyDate + 10
DavidAnalyst Developer with over 17 years Navision, Contract Status - Busy
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions