TO_CHAR (datetime)
Purpose
This function converts a date, timestamp or interval into a string.
Syntax
to_char (datetime)::=
Usage Notes
- The standard format is used if no format is specified, this is defined in session parameter ALTER SESSION or ALTER SESSION.
- For information, refer to the Date/Time Format Models.
- By the optional third parameter you can specify the language setting for the format (for example, NLS_DATE_LANGUAGE).
- Supported languages are German (
DEU
,DEUTSCH
orGERMAN
) and English (ENG
orENGLISH
). - For data type
TIMESTAMP WITH LOCAL TIME ZONE
this function is calculated within the session time zone. - Results for variable-length format masks such as
MONTH
andDATE
will be padded with spaces to their longest possible value.