Adds days [days]
to a date [date]
that can count forwards or backwards on a calendar.
Syntax
offset_days(date(year, month, day), days)
Parameters
date
can be any of the following:- Another function that returns a date.
- A formula column that returns a date.
year
: 4 digits.
For example, 2012month
: 2 digits.
For example, 01 or 12day
: 2 digits.
For example, 01 or 30days
:- Positive number: Counting forwards
- Negative number: Counting backwards
Examples
offset_days(today(), 7)
: If today is 24 October 2016, the function returns 31 October 2016.offset_days(date(2016,10,31), -7)
: Returns 24 October 2016.