# SINCE, UNTIL, DURING

> Set the report's period with relative dates, exact dates, date functions, or named ranges, and choose which date it uses with ON.

The period decides which records count. Use `DURING` for a named range, or `SINCE` and `UNTIL` for your own.

```sql
FROM deals
SHOW won_value
DURING this_quarter
ON won_at
```

## Syntax

```sql
DURING <range>
SINCE <date> [UNTIL <date>]
ON <date field>
```

Use either `DURING` or `SINCE`, not both. With no period, a report covers the last 30 days ([TIMESERIES](https://workstation.repzo.com/docs/analytics/repzoql/timeseries) picks a window for its unit instead).

## DURING

`DURING` takes a named range:

`today`, `yesterday`, `this_week`, `this_month`, `this_quarter`, `this_year`, `last_week`, `last_month`, `last_quarter`, `last_year`, `last_7_days`, `last_30_days`, `last_90_days`, `last_12_months`, `all_time`.

## SINCE and UNTIL

```sql
SINCE -90d
SINCE 2026-01-01 UNTIL 2026-03-31
SINCE startOfMonth(-1m) UNTIL endOfMonth(-1m)   -- last month
SINCE this_year UNTIL today
```

`UNTIL` defaults to today. With `TIMESERIES`, `UNTIL` can stand alone and the start comes from the unit's default window.

## Dates

| Form | Examples | Meaning |
|---|---|---|
| Relative | `-7d`, `-4w`, `-6m`, `-1q`, `-1y` | Days, weeks, months, quarters, or years ago |
| Named day | `today`, `yesterday`, `now` | |
| Exact date | `2026-01-31` | |
| Start or end of a period | `startOfMonth(-1m)`, `endOfQuarter(-1q)` | See [date functions](https://workstation.repzo.com/docs/analytics/repzoql/functions#date-functions) |
| Range name | `this_year`, `last_month` | In `SINCE` its first day, in `UNTIL` its last day |

## ON

By default the period applies to the date each record was created. `ON` picks another date field:

```sql
FROM deals
SHOW won_value
DURING this_year
ON won_at          -- revenue by the day deals were won
```

Common choices: `won_at` and `close_date` on deals, `paid_at` and `issue_date` on invoices, `start_date` on subscriptions, `listed_at` and `sold_at` on listings. Orders use the store's order date when they have one.

## Time zones

Add `WITH TIMEZONE 'America/New_York'` to read "today", "this month" and date functions in a specific time zone. See [WITH](https://workstation.repzo.com/docs/analytics/repzoql/with).

## Related pages

- [COMPARE TO](https://workstation.repzo.com/docs/analytics/repzoql/compare-to)
- [Functions](https://workstation.repzo.com/docs/analytics/repzoql/functions)
- [TIMESERIES](https://workstation.repzo.com/docs/analytics/repzoql/timeseries)
