Date and time (system words)

The date-and-time system variables let you retrieve the system date and time in a variety of formats, as shown in the next table.

System variable Description
sysVar.currentDate Contains the current system date in eight-digit Gregorian format (YYYYMMDD); you can assign this system variable to a variable of type DATE
sysVar.currentFormattedDate Contains the current system date in character format; specifically, in the system default long Gregorian format
sysVar.currentFormattedJulianDate Contains the current system date in character format; specifically, in the system default long Julian format
sysVar.currentFormattedTime Contains the current system time in character format; specifically, in HH:MM:SS format
sysVar.currentJulianDate Contains the current system date in seven-digit Julian format (YYYYDDD). Avoid using this variable, which exists to support code migration from VisualAge Generator to EGL.
sysVar.currentShortDate Contains the current system date in six-digit Gregorian format (YYMMDD). Avoid using this variable, which exists to support code migration from VisualAge Generator to EGL.
sysVar.currentShortJulianDate Contains the current system date in five-digit Julian format (YYDDD). Avoid using this variable, which exists to support code migration from VisualAge Generator to EGL.
sysVar.currentTime Contains the current system time in six-digit Julian format (HHMMSS); you can assign this system variable to a variable to type TIME
sysVar.currentTimeStamp Contains the current system time and date as a timestamp in twenty-digit Julian format (YYYYMMDDHHMMSSFFFFFF); you can this system variable to a variable of type TIMESTAMP

To set a date, time, or timestamp variable, you can assign sysVar.currentDate, sysVar.currentTime, and sysVar.currentTimeStamp, respectively. The functions that return formatted character text cannot be used for this purpose.

Related reference
System words
System words in alphabetical order
EGL statements