ADD_DAYS
Description
The ADD_DAYS
function is used to add numDays
days to the given date startDate
, returning a new date. If the calculation result exceeds the date range supported by the system, it returns null
.
Function Syntax
Parameter Description
startDate
: Date type, represents the start date.numDays
: Integer type, represents the number of days to add.
Return Result
Returns a new date, date type.
Usage Example
- Example of adding days:
- Example of Reducing Days:
- Example of Cross-Year Date Calculation:
- Example of Exceeding Date Range:
Precautions
- Ensure that the
startDate
parameter is in a valid date format, otherwise the function will returnnull
. - When the added days cause the result to exceed the date range supported by the system, the function will return
null
.