Skip to main content
Filters time fields for a specific duration starting from a given point in time. This filter is useful for filtering over various time periods using either relative time (e.g., "28 days ago") or fixed dates (e.g., "2024-06-01").

Syntax

<time_field>:
  time_for_duration: [ <start_time>, <duration> ]

Properties

time_field
string
required
The time or date field to filter on, specified in the format view_name.field_name.
time_for_duration
string[]
required
An array with two elements: [starting_time, unit_of_time_length].
  • start_time - The starting time for the duration. Can be:
    • Relative time: 28 days ago, 7 complete weeks ago
    • Fixed date: 2024-06-01
  • duration - The length of time after the starting point. For example, 30 days, 1 year, 7 days

Examples

From June 1 - 30, 2024
orders.created_date:
  time_for_duration: [ 2024-06-01, 30 days ]
Any time in 2024 except June 1 - 30
orders.created_date:
  not_time_for_duration: [ 2024-06-01, 30 days ]