formatTime()

The datetime function StrLib.formatTime formats a time value and returns a value of type STRING.
  StrLib.formatTime(
    aTime Time in
    [, timeFormat STRING in
    ])
  returns (result STRING)
result
A variable of type STRING.
aTime
The value to be formatted. Can be any expression that resolves to a time value; for example, the system variable DateTimeLib.currentTime.
timeFormat
Identifies the time format, as described in Date, time, and timestamp specifiers. If you specify no value for timeFormat, EGL run time uses the time format in the Java™ locale.
You can use a string, the system variable StrLib.defaultTimeFormat (as described in defaultTimeFormat), or any of these constants:
eurTimeFormat
The pattern HH.mm.ss, which is the IBM® European standard time format.
isoTimeFormat
The pattern HH.mm.ss, which is the time format specified by the International Standards Organization (ISO).
jisTimeFormat
The pattern HH:mm:ss, which is the Japanese Industrial Standard time format.
usaTimeFormat
The pattern hh:mm AM, which is the IBM USA standard time format.

Related concepts
Syntax diagram for EGL functions

Related reference
Date, time, and timestamp format specifiers
defaultTimeFormat (system variable)
EGL library StrLib
TIME

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