MySQLDate/Time FunctionsDATE_ADD
STR_TO_DATE

DATE_ADDDate/Time Functions

DATE_SUB

Adds an interval to a date.

Syntax

DATE_ADD(date, INTERVAL n unit)

Example

Enter values below to update the example in real time.

order_id
order_date
delivery_due
orders
-- 주문 후 7일 배송 예정일 계산
SELECT order_id, order_date,
       DATE_ADD(order_date, INTERVAL 7 DAY) AS delivery_due
FROM orders;