PostgreSQLString FunctionsTO_CHAR
INITCAP

TO_CHARString Functions

REGEXP_REPLACE

Converts a value to a formatted string.

Syntax

TO_CHAR(value, format)

Example

Enter values below to update the example in real time.

order_date
order_date_kr
orders
-- 날짜를 한국식 포맷으로
SELECT TO_CHAR(order_date, 'YYYY"년" MM"월" DD"일"') AS order_date_kr
FROM orders;