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

# GENERATE_DATE_ARRAY

> Generates an inclusive stepped array of dates.

<div className="e6-meta"><span className="e6-eyebrow e6-eyebrow--quiet">Scalar function</span></div>

A NULL interval is rejected. Use non-NULL start and end values; NULL endpoints do not have reliable result-size or NULL behavior.

## Syntax

### Scalar

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
generate_date_array(start, end, step)
```

## Arguments

| Name | Type | Required | Description |
| - | - | - | - |
| start | DATE constant | Yes | Inclusive starting bound. Non-NULL scalar literal bounds. Keep every generated value and one additional step past the final value within the supported range. Must be a constant argument. |
| end | DATE constant | Yes | Inclusive ending bound when reachable. Non-NULL scalar literal bounds. Keep every generated value and one additional step past the final value within the supported range. Must be a constant argument. |
| step | INTERVAL constant | Yes | Signed interval step. Non-NULL scalar interval. Use finite fixed-duration day steps (DATE) or day/time steps (TIMESTAMP) whose conversion arithmetic fits the integer range. Must be a constant argument. |

## Returns

* Type: ARRAY\<DATE>
* NULL behavior: A NULL interval is rejected. Use non-NULL start and end values; NULL endpoints do not have reliable result-size or NULL behavior.
* Shape: One array containing bounds and successive reachable values; wrong-direction or zero step yields \[].
* Ordering: Step order: ascending for positive step and descending for negative step.

## Properties

| Property | Value |
| - | - |
| Deterministic | Yes |
| Exact result | Yes |

## Usage notes

* Month interval components are converted to fixed 30-day spans, not calendar month changes.
* The date form ignores interval milliseconds/nanoseconds; timestamp form converts sub-day components to microseconds.

## Examples

### Basic example

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT generate_date_array(DATE '2024-01-01',DATE '2024-01-03',INTERVAL '1' DAY) AS result;
```

| result |
| - |
| \["2024-01-01","2024-01-02","2024-01-03"] |

### A step that skips the end date

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT generate_date_array(DATE '2024-01-01', DATE '2024-01-04', INTERVAL '2' DAY) AS dates;
```

| dates |
| - |
| \["2024-01-01","2024-01-03"] |

## Limitations

* Bounds and intervals must be constants. They cannot depend on values from each row.
* Supply non-NULL start, end, and step values.
* Keep every generated value, including the step after the final value, within the type’s range. Overflow is not checked. There is no fixed maximum array length; large results can use substantial memory.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.