PostgreSQL Function Reference

TO_CHAR
Converts a date/time or number to a string according to the format.
PostgreSQL 17.5
TO_CHAR(timestamp, format)
timestamp
The value to convert.
format
The format string.
Examples
PostgreSQL 17.5
SELECT TO_CHAR(NOW(), 'YYYY-MM-DD')