Share via


systemDateSet Function

Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

Changes the system date.

date systemDateSet(date _date)

Parameters

Parameter

Description

_date

The new date for the system

Return Value

The new system date.

Remarks

This function does not affect the session date.

This method will change the date, but the time will be set to zero.

Example

The following example sets the system date to today's date.

    static void systemDateSetExample(Args _arg)
    {
        date d = today();
        ;
        d = systemDateSet(d);
        print d;
        pause;
    }

See also

DateTimeUtil Class

systemDateGet Function

Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).