6

What are the function calls to get the System Date and Current Date using X++ in Microsoft Dynamics AX?

4

4 回答 4

13

使用类DateTimeUtil中的静态方法:

两者都返回 UTC 日期和时间,但将在显示时转换为本地时间。

请参阅最佳实践

于 2010-12-20T12:35:33.507 回答
7

systemDateGet() and Today()

http://msdn.microsoft.com/en-us/library/aa672952.aspx

于 2010-12-07T17:21:48.947 回答
6

在动力学斧 < 2009

当前的日期:

Today()

今天功能提供的系统日期应该只在需要实际机器日期的地方使用。

系统日期:

SystemDateGet()

大多数应用程序逻辑应该使用系统函数systemDateGet,它保存系统的逻辑日期。

于 2010-12-07T17:22:54.763 回答
2

SystemDateGet() is the command to get current date in a display method.

today() method, which might return a different date (it returns the machine date, not the date from Dynamics AX).

于 2010-12-07T17:19:49.400 回答