> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omni.co/llms.txt
> Use this file to discover all available pages before exploring further.

# between_dates

> Filters time fields for dates falling within a specified range.

Filters time fields for dates falling within a specified range. Returns rows where the date is between the start and end dates (inclusive).

<Tip>
  This filter is **inclusive** of the start date and end date.
</Tip>

## Syntax

```yaml theme={null}
<time_field>:
  between_dates: [<start_date>, <end_date>]
```

## Properties

<ParamField path="time_field" type="string" required>
  The time/date field to filter on, specified in the format `view_name.field_name`.
</ParamField>

<ParamField path="between_dates" type="date[]" required>
  An array with two date values: `[start_date, end_date]`. Dates can be:

  * **Fixed date** - Specified in `YYYY-MM-DD` format. For example, `2024-01-01`.
  * **Relative date** - For example, `today`, `7 days ago`
</ParamField>

## Examples

```yaml title="Between two fixed dates" theme={null}
users.created_at:
  between_dates: [2024-01-01, 2024-12-31]
```

```yaml title="Between two relative dates" theme={null}
events.event_date:
  between_dates: [7 days ago, today]
```
