intvMax Function [AX 2012]

Updated: December 11, 2009

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

Retrieves the number of intervals for the specified period when dividing the period into parts, as specified by the func parameter.


int intvMax(date input_date, date ref_date, int func)

Parameter

Description

input_date

The end of the period, which must be later than the ref_date parameter.

ref_date

The start of the period.

func

A IntvScale system enumeration value that indicates the division unit.

Possible values for the func parameter are:

  • None

  • YearMonthDay

  • YearMonth

  • Year

  • MonthDay

  • Month

  • Day

  • YearQuarter

  • Quarter

  • YearWeek

  • Week

  • WeekDay

static void intvMaxExample()
{
    date refDate = str2Date("4/9/2007", 213);
    date inputDate = str2Date("10/5/2007", 213);
    int numberOfIntervals;
    ;
    numberOfIntervals = intvMax(inputDate, refDate, intvScale::YearMonth);
    print numberOfIntervals;
    pause;
}

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

Community Additions

ADD
Show: