- Description: Converts a date or number to a string.
- Purpose: Formatting output for readability.
- Syntax:
TO_CHAR(value, format)
- Parameters:
value
: Date or number to convert.format
: Format model for the output.
- Returns: A string representation of the value.
- Example:
TO_CHAR(SYSDATE, 'DD-MON-YYYY')
returns the current date as a string. - Notes: Useful for custom date and number formats.
- Use Case: Displaying dates in reports in a specific format.
Leave a Reply