---
title: "Setting Date Range"
slug: "setting-date-range"
description: "Get data from the last couple of days, last month or last year with Dataddo. Easily configure date range & snapshotting frequency with our step-by-step guide."
updated: 2025-07-24T18:08:43Z
published: 2025-07-24T18:08:43Z
---

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

# Setting Date Range

When setting up a time-sensitive data source, you have the option to **define the date range for data retrieval**. With each data extraction, data within this specified timeframe will be consistently loaded.

## Use Case Examples

1. **Daily Data Loads**: Set the date range to **Yesterday** and the [snapshotting frequency](https://docs.dataddo.com/docs/extraction#extraction-frequency)  to **Daily**.
2. **Monthly Data Loads**: Use **Last Month** as the date range and set the snapshotting frequency to **Monthly**.
3. **Specific Use Case**: To extract weekly data, set the date range to **Last 7 days** and the snapshotting frequency to **Weekly** when creating a source. This will capture a snapshot of the past week's data every week.

You can load data from the last couple of days, last month, last year etc. This is especially useful when e.g. [loading historical data](/docs/data-backfilling-to-storages)

## Dynamic Date Range

If the date range you need is not available in the date picker selection, you can specify a different date range in the source URL (in the [**Sources**](https://app.dataddo.com/sources) page, click on your ***data source*** and navigate to the **Advanced Settings** tab).

In these cases, your date-related parameters can be defined as **part of the API call** using a **dynamic date range**, which extracts data **relative to today**’s date.

The URL of a source can look like this:

```
https://api.service.com/endpoint?startDate={{1m1}}&endDate={{1m1}}
```

The expression enclosed in double curly brackets **{{1m1}}** consists of three parts:

1. **1**m1 (the number at the start of expression): This represents the number of units (here months) to go back from the current date and defines the start of the range. 0 represents the current value.
2. 1**m**1 (unit definition): **d** = day (1**d**0), **m** = month (1**m**1), **w** = week (1**w**1)
3. 1m**1** (the last number): Sets the end of the range. 0 marks today, 1 marks yesterday, and so on. There is a rule that the first digit has to always be larger than the second one.

| Expression | Meaning in ISO 8601 |
| --- | --- |
| {{0d0}} | Today |
| {{1d1}} | Yesterday |
| {{1d0}} | Yesterday and today |
| {{0m0}} | This month |
| {{1m1}} | Last month |
| {{90d1}} | 90 ago until yesterday |
| {{1w1}} | Last week |
| {{0w0}} | This week starting from Monday |
| {{0y0}} | This year |
| {{1y1}} | Last year |
| {{1d1\|U}} | Yesterday in Unix seconds |

**Examples** API Call with 'yesterday' date range:

```
https://api.service.com/endpoint?startDate={{1d1}}&endDate={{1d1}}
```

API Call with 'this month' date range:

```
https://api.service.com/endpoint?startDate={{0m0}}&endDate={{0m0}}
```

### Date String Formatting

**Date string formatting** is possible when APIs don't allow the standard ISO 8601 date format (YYYY-MM-DD format). In these cases, please use the following expressions:

| Expression | Output |
| --- | --- |
| {{0d0\|Ymd}} | 20201231 |
| {{0d0\|Ydm}} | 20203112 |
| {{0d0\|d/m/Y}} | 31/12/2020 |
| {{0d0\|Y-m-d}} | 2020-12-31 |
| {{0d0\|Y-m-d\TH:i:s}} | 2020-12-31T00:00:00 |
| {{0d0\|U}} | 1698403939 |

## Static Date Range

Custom date range is also used for manual data load when a calendar date range is not available. In this case, to [load historical data](/docs/data-backfilling-to-storages), you will need to specify your date range in the ***data source*** URL.

Use a **static date range** expression when you need to extract data from a specific time period.

```
https://api.service.com/endpoint?startDate=2020-01-01&endDate=2020-12-31
```

Don't forget to change this configuration back to [dynamic date range](/docs/setting-date-range#dynamic-date-range), otherwise you will keep extracting data solely from January 1, 2020 until December 31, 2020.

![Historical data load - source URL](https://cdn.document360.io/084ed225-3f99-4644-a2da-39ca0cd5ef45/Images/Documentation/Historical%20data%20load%20-%20source%20URL.png)

## Related Articles

For more information on **manual data load** and **data backfilling**, see the following articles:

- [Data Backfilling to Dashboarding Apps](/docs/data-backfilling-to-dashboarding-apps)
- [Data Backfilling to Storages](/docs/data-backfilling-to-storages)
- [Data Backfilling for Database Replication](/docs/data-backfilling-for-database-replication)

A snapshot captures the state of data from a source at a specific point in time. Each data extraction creates a new snapshot and all snapshots collectively form a time series.
