systemDateSet Function

Changes the system date.


date systemDateSet(date _date)

Parameter

Description

_date

The new date for the system

The new system date.

This function does not affect the session date.

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

This method is deprecated. Use the DateTimeUtil::SetSystemDateTime and DateTimeUtil::GetSystemDateTime methods instead of this because this method does not support time zones. When this method is used, the local time is changed to zero.

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;
}

Community Additions

ADD
Show: