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.
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?
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.
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?
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.
Comments
It will return 01/01/10 \:D/
WRONG!
CORRECT: CALCDATE('<-CY>',TODAY))
When giving advice, try to follow basic rules for the code... ;-)
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
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?
My Blog - nav.education
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.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.