Options

Want to Add a date formula field to Another Date formula fie

sharadsharad Member Posts: 112
edited 2013-11-22 in NAV Three Tier
Hello Friends,

I want to Add a dateformula type field to another Dateformula type. Ex- I have a Variable of Type DateFormula and In Setup I have a field of Type DateFormula which have Value like 6M or 120D or 1Y. then I am generating 10 rows so I want Data like 6M,12M,18M,.....(If I give 6M in Setup). How would I achive this plz suggest me.






THANKS
Sharad Gupta
Navision Technical Consultant & .Net Developer

Comments

  • Options
    thegunzothegunzo Member Posts: 274
    NewDate := CALCDATE(Setup.DateFormula,CALCDATE(TheOtherDateFormula,OriginalDate));
    
    ________________________________
    Gunnar Gestsson
    Microsoft Certified IT Professional
    Dynamics NAV MVP
    http://www.dynamics.is
    http://Objects4NAV.com
  • Options
    casanovacasanova Member Posts: 194
    hi..
    how about if i want to add Dateformula + dateformula = dateformula
    for example
    Field1 = 5D
    Field2 = 10D

    so Field3 ==> Field1 + Field2 = 5D + 10D = 15D
    how to do that?
    thanks
  • Options
    matttraxmatttrax Member Posts: 2,309
    You would pretty much be rewriting the logic to parse the date formula and add it together. Just let NAV handle it for you behind the scenes. +5D+10D is exactly the same as +15D
  • Options
    casanovacasanova Member Posts: 194
    matttrax wrote:
    You would pretty much be rewriting the logic to parse the date formula and add it together. Just let NAV handle it for you behind the scenes. +5D+10D is exactly the same as +15D
    if i directly add these 2 fields
    it wont work

    i must calculate as integer,
    and then add 'D' to become text format
    after that evaluate to become dateformula type
Sign In or Register to comment.