timestampValue()

The dateTimeLib.timestampValue() system function returns a TIMESTAMP value based on a string that follows the pattern: "yyyyMMddHHmmss". EGL maintains this function for compatibility with earlier versions. For new code, you can simply assign a string to a TIMESTAMP variable. See "Assignment compatibility in EGL."

The input string must contain exactly fourteen digits, in the following format:
  • The first four digits represent the year.
  • The next two represent the numeric month.
  • The next two represent the day of the month.
  • The next two represent the number of hours (00-24).
  • The next two represent the number of minutes within the hour.
  • The last two represent the number of seconds within the minute.

The variable to which you assign the return value of the function must be a TIMESTAMP with the mask "yyyyMMddHHmmss". If you want to use a TIMESTAMP variable with a different mask than "yyyyMMddHHmmss", use dateTimeLib.timestampValueWithPattern().

Syntax

  dateTimeLib.timestampValue(timestampAsString STRING? in)
  returns (result TIMESTAMP?)
timestampAsString
A string constant or literal that contains fourteen digits whose meaning is indicated by the timestamp pattern "yyyyMMddHHmmss".
result
A TIMESTAMP value. If timestampAsString has a null value, the function returns the current date and time.