generate_series
Create a list of values from start to stop, including stop. Start defaults to 0 and step defaults to 1.
Try an expression
In Formula, enter the expression and set Output type to VARCHAR.
Expression
generate_series(DATE '2024-01-01', DATE '2024-01-03', INTERVAL 1 DAY)Result
'['2024-01-01 00:00:00', '2024-01-02 00:00:00', '2024-01-03 00:00:00']'The expression returns TIMESTAMP[]. Formula stores it as VARCHAR in this example. To use your own data, replace the example values with column names. Keep format strings and other options as written.
Arguments and types
generate_series([start, ]stop[, step])- start
- Number, Timestamp
- stop
- Number, Timestamp
- step
- Number, Interval
The result type can depend on the input types. See DuckDB for the full argument rules.
Things to know
If the first argument is missing, the result is NULL.
Function metadata from DuckDB, used under the MIT license.