MySQLDate/Time FunctionsDATE
CURTIME

DATEDate/Time Functions

TIME

Extracts the date part from a date/time expression.

Syntax

DATE(expr)

Example

Enter values below to update the example in real time.

order_id
created_at
order_date
orders
-- 날짜 부분만 비교
SELECT order_id, DATE(created_at) AS order_date
FROM orders
WHERE DATE(created_at) = '2024-06-27';