簡體   English   中英

在Dynamics AX 2012中兩個日期之間的月數

[英]Number of months between two dates in Dynamics ax 2012

是否有標准/通用方法/公式來計算Microsoft Dynamic Axe 2012中兩個日期之間的月數?

最近,我遇到一種情況,需要計算兩個日期之間的月數,我發現了可以使用的內置Dynamics AX 2012中的方法。

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.

請從以下網站參考上述方法的示例: https : //community.dynamics.com/ax/b/alirazatechblog/archive/2013/06/11/dynamics-ax-2012-number-of-months-between-two-日期

還有另一種方法可以使用InfAdjValidation_MX :: monthDifference(FromDate _fromDate,ToDate _toDate)在Dynamics ax 2012中以月為單位計算兩個日期之間的差異。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM