What are the function calls to get the System Date and Current Date using X++ in Microsoft Dynamics AX?
Asked
Active
Viewed 8.4k times
4 Answers
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.

Jan B. Kjeldsen
- 17,817
- 5
- 32
- 50

Rod
- 401
- 2
- 9
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.

James Moore
- 2,501
- 6
- 26
- 29
-
5`SystemDateGet` is deprecated, use the methods from `DateTimeUtil` instead. – user85421 Dec 08 '10 at 18:40
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).

Sankar Ganesh PMP
- 11,927
- 11
- 57
- 90