Dynamic Date Range
  • 1 Minute to read
  • Dark

Dynamic Date Range

  • Dark

If the date range selection when creating source was not sufficient, you can define a dynamic date range relative to the current date.

When is Dynamic Range Needed?

In some cases, your date-related parameters have to be defined as part of the API call.


If this call is automated, the extracted data will be from January 1, 2020 until December 31, 2020 every time. As such, both startDate and endDate parameters should be defined via a dynamic date range.

How Does it Work?

The URL of a source can look like this:


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

  1. The number at the start of expression 1m1. 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. Unit definition: d = day (1d0), m = month (1m1), w = week (1w1)
  3. 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.






Today in ISO 8601




Yesterday and today


This month


Last month


Ninety days ago until yesterday


Last week


This week starting from monday


This year


Last year


Yesterday in unix seconds

API Call with 'yesterday' Date Range


API Call with 'this month' Date Range


Date String Formatting

Date string is by default written in the YYYY-MM-DD format (e.g. 2020-12-31). Unfortunately, not all APIs follow ISO 8601 standards. In such cases, it is possible to use date string formating.

Custom Formatting Examples







Change Date Range in Manual Data Load

Dynamic date range is also used for manual data load when a calendar date range is not available. In this case, to manually load historical data, you will need to specify your date range in the source URL.

Historical data load - source URL

Was this article helpful?

What's Next