EGL library dateTimeLib

The date and time system functions and variables let you manipulate and retrieve the system date and time in a variety of formats.

The dateTimeLib functions are shown in the following table.

System function Description
result = currentDate() Returns the current system date.
result = currentTime() Returns the current system time.
result = currentTimestamp() Returns the current system time and date as a timestamp in twenty-digit format ("yyyyMMddHHmmssffffff").
result = dateOf (aTimeStamp) Returns a date derived from a TIMESTAMP variable.
result = dateValue (dateAsString) Returns a DATE value that corresponds to an input string.
result = dateValueFromGregorian (gregorianIntegerDate) Returns a DATE value that corresponds to an integer representation of a Gregorian date.
result = dateValueFromJulian (julianIntegerDate) Returns a DATE value that corresponds to an integer representation of a Julian date.
result = dayOf (aTimeStamp) Returns a positive integer that represents a day of the month, as derived from a TIMESTAMP variable.
result = extend (extensionField [, pattern]) Converts a TIMESTAMP, TIME, or DATE into a longer or shorter TIMESTAMP value.
result = intervalValue (intervalAsString) Returns an INTERVAL value that reflects a string constant or literal.
result = intervalValueWithPattern (intervalAsString[, intervalPattern)] Returns an INTERVAL value that reflects a string constant or literal and is built based on an interval pattern that you specify.
result = mdy (month, day, year) Returns a DATE value derived from three integers that represent the month, day of the month, and year of a calendar date.
result = monthOf (aTimeStamp) Returns a positive integer that represents a month, as derived from a variable of type TIMESTAMP.
result = timeOf ([aTimeStamp]) Returns a TIME value that represents the time of day derived from either a TIMESTAMP variable or the system clock.
result = timestampFrom (tsDate, tsTime) Returns the specified time and date as a timestamp in twenty-digit format ("yyyyMMddHHmmssffffff"); you can assign the return value of this system function to a variable of type TIMESTAMP.
result = timestampValue (timestampAsString) Returns a TIMESTAMP value that reflects a string constant or literal.
result = timestampValueWithPattern (timestampAsString[, timestampPattern]) Returns a TIMESTAMP value that reflects a string and is built based on a timestamp pattern that you specify.
result = timeValue (timeAsString) Returns a TIME value that reflects a string constant or literal.
result = weekdayOf (aTimeStamp) Returns a positive integer (0-6) that represents a day of the week, as derived from a variable of type TIMESTAMP.
result = yearOf (aTimeStamp) Returns an integer that represents a year, as derived from a variable of type TIMESTAMP.

To set a DATE, TIME, or TIMESTAMP variable, you can assign the value returned by dateTimeLib.currentDate(), the value returned by dateTimeLib.currentTime(), and the value returned by dateTimeLib.currentTimeStamp(), respectively. The functions that return formatted character text cannot be used for this purpose.


Feedback