The
system function StrLib.formatDate formats a date value and returns
a value of type STRING.
StrLib.formatDate(
dateValue DATE in
[, dateFormat STRING in])
returns (result STRING)
- result
- A variable of type STRING.
- dateValue
- The value to be formatted. Can be any expression that resolves to a date
value; for example, the system variable VGVar.currentGregorianDate.
- dateFormat
- Identifies the date format, as described in Date, time, and timestamp
specifiers. If you specify no value for dateFormat, EGL run time
uses the date format in the Java™ locale.
You can use a string, the
system variable
StrLib.defaultDateFormat (as described in
defaultDateFormat),
or any of these constants:
- StrLib.eurDateFormat
- The pattern dd.MM.yyyy, which is the IBM® European standard date format
- StrLib.isoDateFormat
- The pattern yyyy-MM-dd, which is the date format specified by the
International Standards Organization (ISO)
- StrLib.jisDateFormat
- The pattern yyyy-MM-dd, which is the Japanese Industrial Standard
date format
- StrLib.usaDateFormat
- The pattern MM/dd/yyyy, which is the IBM USA standard date format