Generate all dates between two dates

Example

Write SPL script:


A

1

=periods(date("2020-01-01"),date("2020-01-10"),1)

2

=periods(date("2020-01-01"),date("2020-01-10"),2)

 

A1 periods(s,e,i) function, s is the start date, e is the end date, i is the interval, the default interval unit is day, @m means i means month, @y means year, @ q means quarter, @t means ten days, @s means second, the result of A1 is:

2020-01-01

2020-01-02

2020-01-03

2020-01-04

2020-01-05

2020-01-06

2020-01-07

2020-01-08

2020-01-09

2020-01-10

 

A2 changes the parameter of A1 i in to 2, and the result is as follows:

2020-01-01

2020-01-03

2020-01-05

2020-01-07

2020-01-09

2020-01-10