Hi All,
I am working on Nav4.0SP3. I used search the forum already but I cannot find the exactly answer for my question...I have to apologize first if I do ask the same question..
My question is "How do converse DateFormula to Integer?"
For the example :
I have field called Duration with Dateformula DataType I need to converse this filed to be Month
Ex. If user put data = 18M I just need 18 and if user put data like this --> 1Y+6M+3D I have to converse to Month first and then converse to integer again...for get the value to compute...
I hope you understand my question...
Best Regards,
Wanvisa
0
Comments
I'm quite sure that the CALCDATE function can solve your problems.
Syntax:
NewDate := CALCDATE(DateExpression [, Date])
Where DateExpression can be a DateFormula, Text or Code.
Check on-line help for further information about the function.
Peter
1) It is language-depending
2) Formulas can be complex - e.g. 'CY-2M-5D+1M+1Y-2W+2D+CM' - how do you want to convert that?
8)
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Note: I didn't test it, just typed something out from my head, but I think it makes sense. It's at least a starting point and you can tweak it a little bit.
My Blog - nav.education
I agree with you kine...so I just need some reference for explain to my consultant that we should use integer field it will be better in this case. However I will try code from matttrax that suggested to me..Thanks again
Best Regards,
Wanvisa
Calcdate is a "non linear function", and as any mathematician will tell you, a non linear function can never be converted into a linear function.
OK, before any "real" mathematicians catch me out, CALCDATE is a "non contiguous function" not a "non linear function", but the principle applies to both.
Hmm maybe its both.
RIS Plus, LLC