nextMth Function [AX 2012]

Updated: December 10, 2009

Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

Retrieves the date in the following month that corresponds most closely to the specified date.


date nextMth(date date)

Parameter

Description

date

The date to match in the following month.

The closest match to the specified date that is found in the next month.

  • nextMth(29\02\1996); //returns 29/03/1996.

  • nextMth(31\01\1996); //returns 29\02\1996, because 1996 is a leap year.

static void nextMthExample(Args _arg)
{
    date d;
    ;
    d = nextMth(today()); 
    print "Closest date next month is " 
        + date2Str(d, 2, 2, -1, 2, -1, 4);    
    pause;
}

Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).

Community Additions

ADD
Show: