SQL3 min·September 21, 2025

How to Add Days to a Date in SQL

DATEADD() shifts dates fast — perfect for renewals, cohort windows and birthdays.

How to Add Days to a Date in SQL

Use the DATEADD() function to quickly add days to a date in SQL. This function uses three parameter values:

DATEADD(interval, number, date)

interval — the unit you want to add

  • year, yyyy, yy
  • quarter, qq, q
  • month, mm, m
  • dayofyear, dy, y
  • day, dd, d
  • week, ww, wk
  • weekday, dw, w
  • hour, hh
  • minute, mi, n
  • second, ss, s
  • millisecond, ms

number — the quantity of interval you want to add

This value can be positive if you want dates in the future, or negative to retrieve past dates.

date — the date to be modified

Formatted as YYYY/MM/DD.

For example, if you wanted to add 7 days to the date 2020-01-01, you would use the following SQL query:

SELECT DATEADD(day, 7, '2020-01-01');

DATEADD() Examples

Suppose you have a table called orders with an order_date column. If you wanted to add 7 days to each of these dates, you would use the following query:

SELECT DATEADD(day, 7, order_date) FROM orders;

Use negative intervals to look backwards — no need for a separate DATESUB.

Running your own experiments?

I'm always up for comparing notes with other entrepreneurs pointing AI at real business problems.

Get in touch

More in SQL