Calcdate language independent using variables

helm
Member Posts: 46
Hello all experts
I'm trying to get a calcdatefunction that is using a varible language independent in a Navision Financials 2.60 program.
I've tried the following ways:
and
I'm trying to get a calcdatefunction that is using a varible language independent in a Navision Financials 2.60 program.
I've tried the following ways:
EVALUATE(InvPeriodDF,Cust."Invoice period"); AgrHdr."Next invoice date" := CALCDATE(InvPeriodDF,AgrHdr."Next invoice date");where InvPeriodDF is a DateFormat and Cust."Invoice period" only contains e.g. 1Y or 1M.
and
AgrHdr."Next invoice date" := CALCDATE('<Cust."Invoice period">',AgrHdr."Next invoice date");Both produce the same runtime error where the program wants the swedish letter in the date expression. Am i trying the impossible here or have I missed some way to do this. :-k
0
Comments
-
Well, it will work if you change the language in English, it will work. But I have the idea your 2.60 is singlelanguage (like in most countries).
In this case you need to use Swedish characters.Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
If this is customisation and you want the formula language independant, then could you not use a "Number of Days" Field (Integer) instead?
I recently hardcoded '30D' in a report, which did not work in the French database, so I changed it Language Independant, to use Date + 30;
DaveAnalyst 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 -
Hi.
You need to put pointy brackets around your dateformula like '<+1D>'
This will work in all country databases.Senior Consultant
PLP Consult0 -
Sorry, I didn't spot your code in the first instance:
'<Cust."Invoice period">'
You have embedded all within the single quotes, i.e. you need to do this:'<' + Cust."Invoice period" + '>'
Senior Consultant
PLP Consult0 -
Oh, and by the way, you need to format it like this:
'<' + FORMAT(Cust."Invoice period") + '>'
(I hope this is my last post for this issue :-# )Senior Consultant
PLP Consult0
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