Smart SQL Tools for Every Database

MySQL Function Reference

MySQL DATE_ADD() Function

Learn how to use the MySQL DATE_ADD date function with practical examples and cross-dialect alternatives.

Back to SQL Function Explorer

Syntax

DATE_ADD(date, INTERVAL expr unit)

DATE_ADD adds a time interval to a date or datetime and returns the adjusted value.

Basic Example

SELECT DATE_ADD('2026-05-17', INTERVAL 7 DAY) AS plus_7_days;
-- Result: 2026-05-24

Practical query example

SELECT order_id,
       order_date,
       DATE_ADD(order_date, INTERVAL 30 DAY) AS due_date
FROM orders;

Useful interval units

SELECT DATE_ADD('2026-05-17 09:30:00', INTERVAL 90 MINUTE) AS plus_90_minutes,
       DATE_ADD('2026-05-17', INTERVAL 2 MONTH) AS plus_2_months,
       DATE_ADD('2026-05-17', INTERVAL 1 YEAR) AS plus_1_year;

When to use it

Use DATE_ADD for due dates, renewal dates, retention windows, and schedule offsets in MySQL reports and transactional queries.

Common mistakes

Cross-dialect alternatives

Troubleshoot MySQL DATE_ADD problems

Related SQL Functions

FAQ

Can DATE_ADD add months and years?

Yes. You can use units like MONTH and YEAR with the INTERVAL clause.

Can I subtract using DATE_ADD?

You can pass a negative interval, but most teams prefer DATE_SUB for readability.

Does DATE_ADD work with datetime values?

Yes. It works with DATE, DATETIME, and TIMESTAMP values and returns the adjusted result.