MySQLDate/Time FunctionsDATE_FORMAT
SECOND

DATE_FORMATDate/Time Functions

STR_TO_DATE

Formats a date according to the specified format string.

Syntax

DATE_FORMAT(date, format)

Example

Enter values below to update the example in real time.

order_id
order_date
order_date_kr
orders
-- 날짜를 한국식으로 표시
SELECT order_id, DATE_FORMAT(order_date, '%Y년 %m월 %d일') AS order_date_kr
FROM orders;