systemDateGet Function

Retrieves the session date if it has been set.


date systemDateGet()

The session date if has been set; otherwise, the system date.

An alternative is the [M:DateTimeUtil::getSystemDateTime] method. The DateTimeUtil::getSystemDateTime method compensates for the time zone of the user.

The user should consider using the menu Tools, Session date to start the Session date and time form. The form can be used to actively set the session date. After this set action is detected by the system, subsequent calls to the systemDateGet function return the session date.

The today function returns the system date.

This function does not affect the session date.

This method is deprecated. Use the DateTimeUtil::SetSystemDateTime and DateTimeUtil::GetSystemDateTime methods instead of this because this method does not support time zones.

The following example displays the date in the Infolog window.

static void Job_systemDateGet(Args _arg)
{
    ;
    info(
        date2Str( systemDateGet()
            ,2,2,2,2,4 )
    );
/*********** Actual Infolog output
Message (02:44:52 pm)
2008.04.02
***********/
}

Community Additions

ADD
Show: