Skip to main content
Workday User Guide
Last Updated: 2023-06-23
DATESBETWEEN

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 the
    start_date
    and ending either before or at the
    end_date
    .
  • The
    step
    parameter must be a positive integer when present.
  • Since the
    step
    parameter may be such that the
    end_date
    is never reached exactly, the final date Workday returns in the range is the greatest date that is less than the
    end_date
    , but where adding
    step
    days to that date would make the new date greater than the
    end_date
    .
  • This function is intended for use in array formulas.