DATESBETWEEN
Description
Returns an array of dates that starts and ends on a particular date, with a step
interval between each date.
Syntax
DATESBETWEEN(
start_date
,
end_date
, [
step
])
- start_date: The starting date of the range.
- end_date: The ending date of the range.
- step: The number of days to step between each date. The default is 1.
Example
Formula | Result |
|---|---|
=DATESBETWEEN("01-Jan-2015", "10-Jan-2015", 7) | { "1/1/2015"; "1/8/2015" } |
=DATESBETWEEN("14-Jul-2016", "01-Jul-2016", 2) | { "7/14/2016"; "7/12/2016"; "7/10/2016"; "7/8/2016"; "7/6/2016"; "7/4/2016";
"7/2/2016" } |
Notes
- This function returns a column of dates starting at thestart_dateand ending either before or at theend_date.
- Thestepparameter must be a positive integer when present.
- Since thestepparameter may be such that theend_dateis never reached exactly, the final date Workday returns in the range is the greatest date that is less than theend_date, but where addingstepdays to that date would make the new date greater than theend_date.
- This function is intended for use in array formulas.