currentDate()

The dateTimeLib.currentDate() system function reads the system clock and returns a DATE value that represents the current calendar date. The function returns only the current date, not the time of day.

When you assign a DATE to a numeric type, the value is the number of days since December 31, 1899.

Syntax

  dateTimeLib.currentDate( )
  returns (result DATE)
result
A DATE value that represents the current calendar date. You can assign this result to any variable that is assignment compatible with DATE. See Assignment compatibility in EGL.

Example

In the following example, assume a strLib.defaultDateFormat of "M/d/yy" and a date of December 8, 2006:

  myDate1 INT = dateTimeLib.currentDate();
  writeStdOut(myDate1);
  myDate2 STRING = dateTimeLib.currentDate();
  writeStdOut(myDate2);
  writeStdOut(dateTimeLib.currentDate());
The console displays the following results:
39058
12/8/06
12/8/06

Feedback