Built-in Functions → addDays
addDays() is a scalar date function that returns a new date after adding an integer number of days to a given date. The number of days can be positive or negative.
Signature
addDays(date exp, int days)
The following table illustrates the addDays() parameters:
Parameter | Description |
---|---|
date exp | an expression evaluating to timestamp |
int days | int number of days (+/-) to add to date exp |
Returns
timestamp
Example
Add four days to the date 11:55:12 pm December 24, 2001.
addDays(timestamp("2001-12-24 23:55:12.000"), 4)
This results in the date "2001-12-28".