What is the function to get the system date and current date in Dynamics AX?
Asked Answered
D

4

7

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

Doubler answered 7/12, 2010 at 17:17 Comment(0)
E
13

Use the static methods within class DateTimeUtil:

Both return UTC date and times, but will be converted to local time on display.

See Best Practice.

Edme answered 20/12, 2010 at 12:35 Comment(0)
S
7

systemDateGet() and Today()

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

Systematic answered 7/12, 2010 at 17:21 Comment(0)
D
7

In Dynamics Ax < 2009

Current Date:

Today()

The system date provided by the today function should be used only where the actual machine date is needed.

System Date:

SystemDateGet()

Most application logic should use the system function systemDateGet, which holds the logic date of the system.

Doubler answered 7/12, 2010 at 17:22 Comment(1)
SystemDateGet is deprecated, use the methods from DateTimeUtil instead.Whirlpool
F
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).

Finding answered 7/12, 2010 at 17:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.