DateOffsetByDays function
Returns the given date offset by the given number of days. The offset value can be positive, zero, or negative.
Namespace
datetime
Input
base date(date
), day offset(int
)
Output
date(date
)
Example
If basedate
contains 2011-08-18
and daysoffset
contains the value 2
, then the two following functions are equivalent, and return the date 2011–08–20
.
set-column result datetime:DateOffsetByDays('2011-08-18', 2)
set-column result datetime:DateOffsetByDays(basedate, daysoffset)
If basedate
contains 2011-08-18
and daysoffset
contains the value -31
, then the two following functions are equivalent, and return the date 2011–07–18
.
set-column result datetime:DateOffsetByDays('2011-08-18', -31)
set-column result datetime:DateOffsetByDays(basedate, daysoffset)
Created in 2020 by Google Inc.