scalar-extension
to_char
Format a typed date/time or numeric value into text using template tokens.
Formal Syntax & Structure
sql syntaxsql
to_char(timestamp, template text)Working Example
Example Snippetsql
SELECT to_char(timestamp '2025-01-02','YYYY-MM-DD');