Date filter Code
peloffis
Member Posts: 18
Looking for date filter for first day of year. Looking to feed a filter FirstDayofYear to CurrentDate. Closed I could find was Mon1 for Monday of Week 1, not quite it.
Thanks!
Thanks!
0
Comments
-
Using CALCDATE('-CY',TODAY))
It will return 01/01/10 \:D/0 -
swj wrote:Using CALCDATE('-CY',TODAY))
It will return 01/01/10 \:D/
WRONG!
CORRECT: CALCDATE('<-CY>',TODAY))
When giving advice, try to follow basic rules for the code... ;-)0 -
kine wrote:WRONG!
CORRECT: CALCDATE('<-CY>',TODAY))
Both will work just fine. All of the examples may use < and >, but they are not required for it to work. Personally I think they just clutter the formula. Do they serve some purpose that I am not aware of?0 -
If I run matttrax's code on my German client, I get a runtime error, because the date formula is not recognisable.
If I run kine's code, everything is allright.
A DateFormula entered as string is interpreted according to the current language unless it is surrounded by angle brackets, in which case it is interpreted in English.
Real DateFormula values are language independent, but there are no literals for the DateFormula type.0 -
I forgot to mention that we are on a fiscal year <> then the calendar year. I will try the suggustions. And keep checking for updates. Much thanks.0
-
As vaprog wrote - main reason is the MULTILANGUAGE. Czech do not have CY thus you will get runtime error in other languages, which are using different characters for the dateformula. In Czech it should be 'BR'. Thus the <> is needed each time you are using the dateformula consant in the code. It is same like using textconstant versus direct text in e.g. Error.matttrax wrote:Both will work just fine. All of the examples may use < and >, but they are not required for it to work. Personally I think they just clutter the formula. Do they serve some purpose that I am not aware of?0
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
- 322 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


