Definition:
The Oracle TO_CHAR function converts a string, date, a datetime-interval or a number into a character string.
If the first parameter is DATE type, it will be converted to a string representation. The resulting string style is specified with DATETYPE format elements which are optional parameters in the second parameter.
Example Syntax:
TO_CHAR(nchar_clob_or_nclob)
TO_CHAR (datetime_or_interval)
TO_CHAR (datetime_or_interval, 'format_string')
TO_CHAR (datetime_or_interval, 'format_string', 'nlsparam')
TO_CHAR (number)
TO_CHAR (number,'format_string')
TO_CHAR (number,'format_string', 'nlsparam')
For detailed examples of the available formatting options and their usage, please see the Related Link page below.
Related Links:
Related Code Snippets: