BigQuery · Date function
BigQuery DATE_ADD
DATE_ADD(date, INTERVAL n part) adds days, weeks, months, quarters or years to a DATE and returns a DATE. Adding a month to January 31 returns the last day of February, not March 3.
DATE_ADD shifts a DATE forward by a whole number of DAY, WEEK, MONTH, QUARTER or YEAR units. The amount can be negative and can come from a column: DATE_ADD(issued_on, INTERVAL payment_terms DAY).
Months, quarters and years keep the day of the month when it exists and clamp to the last day of the month when it doesn't: January 31 plus one month is February 28 (or 29), and February 29, 2028 plus one year is February 28, 2029. WEEK is exactly 7 days.
Two shortcuts exist. date + 7 adds days and returns a DATE. date + INTERVAL 7 DAY also works, but it returns a DATETIME, which then fails to compare or union with DATE columns. Time parts such as HOUR are not allowed on a DATE; use DATETIME_ADD or TIMESTAMP_ADD for those.
Syntax
DATE_ADD(date_expression, INTERVAL step_size step_unit)Arguments and return value
| Argument | Description |
|---|---|
date_expression | The DATE to shift. |
step_size | An INT64 number of units. Negative values move backwards. |
step_unit | DAY, WEEK (7 days), MONTH, QUARTER or YEAR. |
Returns: DATE
Examples
Add days, weeks, months and years
SELECT
DATE_ADD(DATE '2026-11-23', INTERVAL 7 DAY) AS plus_7_days,
DATE_ADD(DATE '2026-11-23', INTERVAL 1 MONTH) AS plus_1_month,
DATE_ADD(DATE '2026-11-23', INTERVAL 1 QUARTER) AS plus_1_quarter,
DATE_ADD(DATE '2026-11-23', INTERVAL 1 YEAR) AS plus_1_year;| plus_7_days | plus_1_month | plus_1_quarter | plus_1_year |
|---|---|---|---|
| 2026-11-30 | 2026-12-23 | 2027-02-23 | 2027-11-23 |
Month ends and leap days are clamped
Each call counts from the original date, so two months from January 31 is March 31, not March 28.
SELECT
DATE_ADD(DATE '2026-01-31', INTERVAL 1 MONTH) AS jan31_plus_1m,
DATE_ADD(DATE '2026-01-31', INTERVAL 2 MONTH) AS jan31_plus_2m,
DATE_ADD(DATE '2028-02-29', INTERVAL 1 YEAR) AS leap_plus_1y;| jan31_plus_1m | jan31_plus_2m | leap_plus_1y |
|---|---|---|
| 2026-02-28 | 2026-03-31 | 2029-02-28 |
Invoice due dates from payment terms
WITH invoices AS (
SELECT 'INV-1001' AS invoice_id, DATE '2026-11-23' AS issued_on, 30 AS terms_days UNION ALL
SELECT 'INV-1002', DATE '2026-11-30', 14 UNION ALL
SELECT 'INV-1003', DATE '2026-12-20', 45
)
SELECT
invoice_id,
DATE_ADD(issued_on, INTERVAL terms_days DAY) AS due_on
FROM invoices
ORDER BY invoice_id;| invoice_id | due_on |
|---|---|
| INV-1001 | 2026-12-23 |
| INV-1002 | 2026-12-14 |
| INV-1003 | 2027-02-03 |
Integer days versus INTERVAL: different result types
+ 7 returns a DATE. + INTERVAL 7 DAY returns a DATETIME.
SELECT
DATE '2026-11-23' + 7 AS plus_int,
DATE '2026-11-23' + INTERVAL 7 DAY AS plus_interval;| plus_int | plus_interval |
|---|---|
| 2026-11-30 | 2026-11-30T00:00:00 |
Common mistakes
- Writing the PostgreSQL or MySQL form.
order_date + INTERVAL '1 day'andDATE_ADD(order_date, INTERVAL 1 DAY)with a quoted unit fail; the unit is an unquoted keyword, andDATEADD(day, 1, d)from Snowflake or SQL Server is "Function not found". - Forgetting the INTERVAL keyword.
DATE_ADD(d, 7)fails with "Expected INTERVAL expression". - Adding hours to a DATE.
DATE_ADD(d, INTERVAL 6 HOUR)fails with "DATE_ADD does not support the HOUR date part when the argument is DATE type". Convert to DATETIME or TIMESTAMP first. - Chaining month additions on month ends. Adding one month at a time from January 31 drifts to the 28th (Jan 31, Feb 28, Mar 28). Add
nmonths to the original date, or use LAST_DAY when you need month ends. - Passing a STRING column. A literal such as
'2026-11-23'is coerced to DATE, but a STRING column raises No matching signature; convert it withCASTor PARSE_DATE first.
Cost and performance
- On a date-partitioned table, filters such as
order_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY)still prune partitions, because the right-hand side is a constant expression. DATE_ADD, DATE_SUB, DATE_DIFF and DATE_TRUNC are also on BigQuery's list of functions that can wrap the partitioning column without blocking pruning; check the estimate with a dry run before scheduling the query.
FAQ
How do I add days to a date in BigQuery?
Use DATE_ADD(d, INTERVAL 30 DAY) or the shorter d + 30. Both return a DATE.
How do I add months to a date?
Use DATE_ADD(d, INTERVAL 1 MONTH). If the target month is shorter, the result is that month's last day, so January 31 plus one month is February 28 in 2026.
What is the BigQuery equivalent of DATEADD?
DATE_ADD for DATE values, DATETIME_ADD for DATETIME and TIMESTAMP_ADD for TIMESTAMP. The date comes first and the amount is an INTERVAL: DATE_ADD(d, INTERVAL 1 DAY).
Related
Errors you may hit
More date functions
All BigQuery date functions · All functions · BigQuery error messages
