Sunday, November 16, 2014

Date interval Month

// Date Between the interval Month

static void dateintervalmonth(Args _args)
{
    date d,f;
    int i,months;
    int interval = 8;
    d = mkDate(01,02,2014);
    f = mkDate(01,11,2013);
 
    months = intvNo(d,f,intvScale::YearMonth);
    info(strFmt("%1",months));
 
    for(i = 0;i<= months; i++)
    {
        info(strFmt("%1 - %2",mthname(mthofYr(d)),year(d)));
        d = prevmth(d);
    }
}

No comments:

Post a Comment

Copy Markup charges while posting purchase invoice using X++

 Copy Markup charges while posting purchase invoice using X++ Class: Important: Code logic is just for Reference.  New class => Duplicate...