formatTimeStamp()

The datetime formatting function StrLib.formatTimeStamp formats a parameter into a timestamp value and returns a value of type STRING.
  StrLib.formatTimeStamp(
    aTimeStamp TimeStamp in
    [, timestampFormat STRING in
    ])
  returns (result STRING)
result
A variable of type STRING.
aTimeStamp
The TIMESTAMP value to be formatted. Can be any expression that resolves to a TIMESTAMP value; for example, the system variable DateTimeLib.currentTimeStamp.
timestampFormat
Identifies the date format, as described in Date, time, and timestamp specifiers.
You can use a string, the system variable StrLib.defaultTimestampFormat (as described in defaultTimestampFormat), or one of these constants:
db2TimeStampFormat
The pattern yyyy-MM-dd-HH.mm.ss.ffffff, which is the IBM® DB2® default timestamp format.
odbcTimeStampFormat
The pattern yyyy-MM-dd HH:mm:ss.ffffff, which is the ODBC timestamp format.

Related concepts
Syntax diagram for EGL functions

Related reference
currentTimeStamp()
Date, time, and timestamp format specifiers
defaultTimestampFormat (EGL system variable)
EGL library StrLib
TIMESTAMP

Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.