Adding or subtracting time intervals to dates is straightforward with the DATEADD function. The following is the format for the DATEADD function.
DATEADD( <date_or_time_part>, <value>, <date_or_time_expr> )
The “Date or Time Part” can be any of the date time parts supported by Snowflake:
- year
- month
- day
- week
- quarter
- hour
- minute
- second
- Millisecond
For example, to calculate and add 1-year renewal date from an opportunity’s close date, you can use the following SQL:
DATEADD('years', 1, "CloseDate") AS "1 Year Renewal Date"