util.Datetime.format

Formats a datetime value according to format specification.

Syntax

util.Datetime.format(
   value DATETIME q1 TO q2,
   fmt STRING
)
  RETURNING res STRING
  1. value is the datetime value to be formatted.
  2. fmt is the format string, as described in Formatting DATETIME values.

Usage

The util.Datetime.format() method formats a DATETIME value according to the format specification.

The format string must be a combination of place holders such as %Y, %m, %d, as described in Formatting DATETIME values.

If the source value is NULL the result will be NULL.

Example

IMPORT util
MAIN
    DISPLAY util.Datetime.format( CURRENT, "%Y-%m-%d %H:%M" )
END MAIN