Recently I got small problem to calculate no of months between two dates. Dynamics Ax 2012 provides a default function which calculates no of intervals between two dates based on enumeration.
int intvNo(date input_date, date ref_date, int func)
You can use it as
noOfIntervals = intvNo(refDate, inputDate, intvScale::Month);
intvScale enumation have two values for months
Month
YearMonth
If we provide the intvScale::Month then X++ ignores the year and assumes that month...(read more)
↧