DATE_ADD Syntax in Google Bigquery

To add days, months, years to a date, use the DATE_ADD Function

SELECT DATE_ADD(DATE "2008-12-25", INTERVAL 5 DAY) as five_days_later;
+--------------------+
| five_days_later |
+--------------------+
| 2008-12-30 |
+--------------------+

Other examples:

SELECT DATE_ADD(DATE "2008-12-25", INTERVAL 1 WEEK) as one_week_later;
SELECT DATE_ADD(DATE "2008-12-25", INTERVAL 1 MONTH) as one_month_later;
SELECT DATE_ADD(DATE "2008-12-25", INTERVAL 1 QUARTER) as one_qtr_later;
SELECT DATE_ADD(DATE "2008-12-25", INTERVAL 1 YEAR) as one_year_later;

nVector

posted on 22 Sep 19

Enjoy great content like this and a lot more !

Signup for a free account to write a post / comment / upvote posts. Its simple and takes less than 5 seconds