intvNo Function
Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012
Calculates the number of intervals between two dates when you divide the time into the specified intervals.
int intvNo(date input_date, date ref_date, int func)
Parameters
Parameter |
Description |
---|---|
input_date |
A date that indicates the end of the period |
ref_date |
A date that indicates the start of the period. |
func |
An intvScale enumeration value. |
Return Value
The number of intervals between the dates specified by the ref_date and input_date parameters.
Example
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).
}
See also
Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).