# Date parameter

**Date Parameters** define a default data range to be used in your query, with the start date and end date as placeholders. These parameters are always used in pairs, representing the start and end of a selected time period.

## **Date Parameter Settings**

When creating a Date Parameter, you'll need to configure:

### **Values**

Set the default start and end dates that will be pre-filled in the calendar. These do not restrict what users can select—users can adjust the dates freely.

<figure><img src="/files/Tz29Ky1OJL7WJ5nD4xih" alt=""><figcaption><p><em>Defining Default Start and End dates</em></p></figcaption></figure>

### **Naming**

* **Display name:** The name that will appear in the control UI.
* **SQL name(s):** The name to be used in the SQL query to be replaced by the starting and ending date of the selected period.

## **Using Date Parameters in your SQL Query**

After creating the parameter, add it manually to your SQL query using its placeholders:

```sql
SELECT * FROM `carto-demo-data`.demo_tables.fires_worldwide
WHERE acq_date > {{date_from}} AND acq_date < {{date_to}}
```

Once added, the date picker will appear int he right-side panel, allowing users to adjust the range and see the data source update in real time.

<figure><img src="/files/gIVi2pakqnn9TFsnPoE9" alt=""><figcaption></figcaption></figure>


---

# 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.carto.com/carto-user-manual/maps/sql-parameters/date-parameter.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.
