# Generate Functions

#### <mark style="color:purple;">GENERATE\_DATE\_ARRAY(<</mark>start\_date/timestamp>, \<end\_date/timestamp> , INTERVAL \<step\_int> \<date\_part>)

Returns an array of date.&#x20;

Supported date\_part must be either DAY, MONTH, YEAR

The step\_int parameter determines the increment used to generate dates.

<pre class="language-sql"><code class="lang-sql"><strong>> SELECT GENERATE_DATE_ARRAY( '2023-03-04', '2023-04-26' , INTERVAL 1 DAY) AS date_array
</strong>[2023-03-04, 2023-03-05, 2023-03-06]
</code></pre>

#### <mark style="color:purple;">GENERATE\_TIMESTAMP\_ARRAY(<</mark>start\_timestamp>, \<end\_timestamp>, INTERVAL \<step\_int>  \<date\_part>)

Returns an array of timestamp.&#x20;

Supported date\_part must be either DAY, HOUR, MINUTE, SECOND

The step\_int parameter determines the increment used to generate timestamps.

<pre class="language-sql"><code class="lang-sql"><strong>> SELECT GENERATE_TIMESTAMP_ARRAY(to_timestamp('2016-10-05 00:00:00'), to_timestamp('2016-10-05 05:00:00'),
</strong>                                INTERVAL 1 hour) AS timestamp_array
[2016-10-05 00:00:00, 2016-10-05 01:00:00, 2016-10-05 02:00:00, 2016-10-05 03:00:00, 2016-10-05 04:00:00, 2016-10-05 05:00:00]
</code></pre>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.e6data.com/product-documentation/sql-command-reference/generate-functions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
