Sunday, July 30, 2017

X++ Code To Adding Days and Months With From Date

Date Addition Jobs


    info(strFmt("Today is: %1 ",today()));
   
    //Add days
    info(strFmt("Add 5 days to today: %1 ",today()+5));
    info(strFmt("Add 10 days to today: %1 ",systemdateget()+10));

    //Add months
    info(strFmt("Add 12 months to today: %1 ",dateMthFwd(systemdateget(),12)));  //Adds 1 year
    info(strFmt("Add 24 months to today: %1 ",dateMthFwd(systemdateget(),24)));  // add 2 year

No comments:

Post a Comment