timestampValueWithPattern()

The dateTimeLib.timestampValueWithPattern() system function returns a TIMESTAMP value that reflects a string and can be built using a timestamp pattern that you specify. For example, if the pattern is "yyyy", the input string must contain four digits, and those digits must represent the year value in the TIMESTAMP.

EGL first attempts to use the specified pattern (if any) to create the TIMESTAMP. If you do not provide a pattern, the function behaves in the same way as dateTimeLib.timestampValue(); it assumes a pattern of "yyyyMMddHHmmss".

Syntax

  dateTimeLib.timestampValueWithPattern(
    timestampAsString STRING? in
    [, timestampPattern STRING? in
    ])
  returns (result TIMESTAMP?)
timestampAsString
A string that contains digits whose meaning is indicated by the timestamp pattern.
timestampPattern
Specifies a timestamp pattern that gives meaning to each digit in the first parameter. The default pattern is "yyyyMMddHHmmss". For more information, see Date/time masks and format specifiers. Valid characters for the pattern are y, M, d, H, m, s, f, and S. If this parameter has a null value, the function behaves just like dateTimeLib.timestampValue().
result
A TIMESTAMP variable. If timestampAsString is null, the function returns a null value.

Feedback