> For the complete documentation index, see [llms.txt](https://docs.inforiver.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.inforiver.com/working-with-inforiver/18.-variables/variable-types/date-range.md). Agents can also search and read this documentation through its [MCP server](https://docs.inforiver.com/~gitbook/mcp).

# Date range

Use the date range variable in reports with date dimensions to select a period range.

### 1. Configuration <a href="#id-1.-configuration" id="id-1.-configuration"></a>

This section outlines configurations specific to date range variables.

**1.1. Value:** Assign a default date range for the variable.

**1.2. Enable date range:** Set a time frame within which the date range should be set. You can specify and start date that is lesser than the start date in the Value field and an end date that is greater than the end date in the Value field.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2Fsf8WDpMjgaewOOsBhC5N%2Fimage.png?alt=media&amp;token=4efbba1b-3ab4-4626-8a8a-24d7b0836667" alt=""><figcaption><p>Creating date range variables</p></figcaption></figure>

### 2. Examples <a href="#id-2.-examples" id="id-2.-examples"></a>

**2.1. Filter data**

When you have date dimensions in your reports, you can use date variables to create dynamic filters.

**STEP 1:** Create a date variable with the configuration shown in section 1.

**STEP 2:** Create an Inforiver filter that references the technical name of the date variable.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FbG2qSk9vzrQ5EU4V5bSQ%2Fimage.png?alt=media&amp;token=01d8ccfb-fb7f-4b76-b6bf-9263dac0971d" alt=""><figcaption><p>Create an Inforiver filter</p></figcaption></figure>

**STEP 3:** Notice how the data gets filtered as the variable selection is changed. The Inforiver filter needs to be created only once and does not have to be edited each time we change the date range.

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FUgHXTmqo2h8aowyeNtGk%2FUntitled%20Project.gif?alt=media&amp;token=8c1fd379-9f4c-40f8-8242-c5e8685f7a7e" alt=""><figcaption><p>Filtering date based data using variables</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.inforiver.com/working-with-inforiver/18.-variables/variable-types/date-range.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
