Axapta Dynamics ax 2012中两个日期之间的月数

Axapta Dynamics ax 2012中两个日期之间的月数,axapta,dynamics-ax-2012,Axapta,Dynamics Ax 2012,Microsoft dynamic ax 2012中是否有标准/通用方法/公式来计算两个日期之间的月数?最近,我遇到了一个需要计算两个日期之间的月数的情况,我在dynamics ax 2012中找到了一个可以使用的内置方法 noOfIntervals=intvNo(refDate、inputDate、intvScale::Month) 请参考以下网站上的上述方法示例: 在Dynamics ax 2012中,还有另一种方法可以使用ADJValidation_MX::monthDifference

Microsoft dynamic ax 2012中是否有标准/通用方法/公式来计算两个日期之间的月数?

最近,我遇到了一个需要计算两个日期之间的月数的情况,我在dynamics ax 2012中找到了一个可以使用的内置方法

noOfIntervals=intvNo(refDate、inputDate、intvScale::Month)

请参考以下网站上的上述方法示例:


在Dynamics ax 2012中,还有另一种方法可以使用ADJValidation_MX::monthDifference(FromDate _FromDate,ToDate _ToDate)方法以月为单位计算两个日期之间的差值。

最近,我遇到了一种情况,需要计算两个日期之间的月数,我在dynamics ax 2012中找到了一个可以使用的内置方法

noOfIntervals=intvNo(refDate、inputDate、intvScale::Month)

请参考以下网站上的上述方法示例:

在Dynamics ax 2012中,还有另一种方法可以使用ADJValidation_MX::monthDifference(FromDate _FromDate,ToDate _ToDate)方法计算两个日期(以月为单位)之间的差异

intvScale enumation have two values for months   

◾Month  
◾YearMonth  

If we provide the intvScale::Month then X++ ignores the year and assumes 
that month is calculated within one year.

If we provide the intvScale::YearMonth then X++ calculate the number of 
months between different years. Consider following example.