Adding to DATE using DATE_ADD Syntax in Google Bigquery

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

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

Other examples:

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

nVector

posted on 10 Oct 20

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