[英]Number of months between two dates in Dynamics ax 2012
是否有标准/通用方法/公式来计算Microsoft Dynamic Axe 2012中两个日期之间的月数?
Recently I got a situation where I need to calculate the number of months between 2 dates, I found a built-in method in dynamics ax 2012 that can be used. 最近,我遇到一种情况,需要计算两个日期之间的月数,我发现了可以使用的内置Dynamics AX 2012中的方法。
noOfIntervals = intvNo(refDate, inputDate, intvScale::Month); 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 is calculated within one year.
If we provide the intvScale::YearMonth then X++ calculate the number of
months between different years. Consider following example.
please refer example of above method from below website: https://community.dynamics.com/ax/b/alirazatechblog/archive/2013/06/11/dynamics-ax-2012-number-of-months-between-two-dates 请从以下网站参考上述方法的示例: https : //community.dynamics.com/ax/b/alirazatechblog/archive/2013/06/11/dynamics-ax-2012-number-of-months-between-two-日期
There is another way to Calculates the difference between two dates in month units in Dynamics ax 2012 using method InfAdjValidation_MX::monthDifference(FromDate _fromDate, ToDate _toDate) 还有另一种方法可以使用InfAdjValidation_MX :: monthDifference(FromDate _fromDate,ToDate _toDate)在Dynamics ax 2012中以月为单位计算两个日期之间的差异。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.