PLUSDAYS
- PLUSDAYS(date, days)[source]
Returns a new date by adding a specified number of days to a given date.
The PLUSDAYS function calculates a new date by adding days to the input date. Both single dates and arrays of dates are supported, and the number of days can be a single integer or an array of integers. If any input is blank or in an error state, the formula evaluates to an error.
- Parameters:
date (
Operand) –The starting date to which days will be added.
Supported types:
DATE
DATETIME
DATE_ARRAY
DATETIME_ARRAY
days (
Operand|int) –The number of days to add to date. Can be a single integer or an array of integers.
Supported types:
INTEGER
INTEGER_ARRAY
- Return type:
- Returns:
The resulting date after adding the specified number of days. The type of the result matches the input date, unless days is an array, in which case the result will be the array version of the date type.
Supported types:
DATE
DATETIME
DATE_ARRAY
DATETIME_ARRAY
- Raises:
ValueError – If date is not of type DATE, DATETIME, DATE_ARRAY, or DATETIME_ARRAY.
ValueError – If days is not of type INTEGER or INTEGER_ARRAY.
Examples
Adding days to a single date:
PLUSDAYS(DATE(2025, 9, 3), 5) # Returns DATE(2025, 9, 8)
Adding an array of days to a single date:
PLUSDAYS(DATE(2025, 9, 3), [1, 2, 3]) # Returns [DATE(2025, 9, 4), DATE(2025, 9, 5), DATE(2025, 9, 6)]