The TO_CHAR function
The TO_CHAR function converts DATETIME or DATE values to character string values. The TO_CHAR function evaluates a DATETIME value according to the date-formatting directive that you specify and returns an NVARCHAR value. For a complete list of the supported date-formatting directives, see the description of the GL_DATETIME environment variable in the HCL OneDB™ GLS User's Guide.
You can also use the TO_CHAR function to convert a DATETIME or DATE value to an LVARCHAR value.
The following query
uses the TO_CHAR function to convert a DATETIME
value to a more readable character string.
The following query uses the TO_CHAR function
to convert DATE values to more readable character strings.
The TO_CHAR function can also format numeric values. For more information about the built-in TO_CHAR function, see the HCL OneDB Guide to SQL: Syntax.