intvNo Function
Dynamics AX 4.0
Returns the number of intervals between the ref-date and the input-date when you divide the time into intervals specified by func.
int intvNo(date input_date, date ref_date, int func)
static void intvNoExample(Args _args)
{
date inputDate = str2Date("1/1/2007", 213);
date refDate = str2Date("3/1/2007", 213);
int noOfIntervals;
;
noOfIntervals = intvNo(refDate, inputDate, intvScale::Month);
print noOfIntervals;
pause;
//noOfIntervals now holds the difference in months between March and January (2).
}
Community Additions
ADD
Show: