---
title: "range function in Strata | Oplema"
description: "Create a list of values from start up to stop, excluding stop. Write it as range([start, ]stop[, step]) in a Strata Formula or Filter."
url: "https://oplema.com/docs/strata/functions/range"
updated: "2026-11-04"
---

# range

Create a list of values from start up to stop, excluding stop. Start defaults to 0 and step defaults to 1.

## Try an expression

In [Formula](https://oplema.com/docs/strata/prep/formula), enter the expression and set Output type to **VARCHAR**.

### Expression

```
range(DATE '2024-01-01', DATE '2024-01-03', INTERVAL 1 DAY)
```

### Result

```
'['2024-01-01 00:00:00', '2024-01-02 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.

Try it live in Formula

Result
| id | result |
| --- | --- |
| 1 | \['2024-01-01 00:00:00', '2024-01-02 00:00:00'\] |

## Arguments and types

```
range([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.

## Related functions

[generate\_series

Create a list of values from start to stop, including stop. Start defaults to 0 and step defaults to 1.

](https://oplema.com/docs/strata/functions/generate-series)[age

Calculate the time between two timestamps as an interval, subtracting the second from the first.

](https://oplema.com/docs/strata/functions/age)[date\_diff

Count the unit boundaries crossed between two dates or timestamps. For example, January 31 to February 1 crosses one month boundary.

](https://oplema.com/docs/strata/functions/date-diff)[date\_sub

Count the complete units between two dates or timestamps. For example, January 31 to February 1 is zero complete months. Also available as datesub.

](https://oplema.com/docs/strata/functions/date-sub)

[Browse dates & times](https://oplema.com/docs/strata/functions#dates-&-times) [DuckDB documentation](https://duckdb.org/docs/current/sql/functions/timestamptz.html#rangetimestamptz-timestamptz-interval)

Function metadata from DuckDB, used under the [MIT license](https://github.com/duckdb/duckdb/blob/v1.5.4/LICENSE).
