Skip to content
Last updated

Timestamp Operators in Audience Studio

Audience segmentation is an essential part of any successful marketing campaign. With Audience Studio, Treasure Data provides a variety of timestamp operators that enable you to filter your segment and journey data and create audiences for activation.

TD timestamp operators enable you to filter your audience segment data based on specific date and time criteria. By leveraging these operators, you can accurately filter your segment data and create audiences tailored to your specific marketing goals.

Relative Timestamp Operators

The following relative timestamp operators have been renamed:

  • within is now within(legacy)
  • today is now today and beyond
  • this is now this(legacy)

The functionalities of these timestamp operators have not been changed.

OperatorDescriptionExamples
in between the nextSelects data between two time intervals in the future (inclusive)in between the next 3 - 7 days: Select data from the next 3 to 7 days
in between the pastSelects data between two time intervals in the past (inclusive)in between the past 3 - 7 days: Select data from the last 3 to 7 days
lastSelects data from a specific unit of time in the pastlast day: Select data from the previous calendar daylast month: Select data from the previous calendar month (not the last 30 days)last quarter: Select data from the previous calendar quarter (not the last 3 months)
nextSelects data from a specific unit of time in the futurenext day: Select data from the next calendar daynext month: Select data from the next calendar month (not the next 30 days)next quarter: Select data from the next calendar quarter (not the next 3 months)
not in between the nextSelects data outside of a range of two time intervals in the futurenot in between the next 4 - 8 days: Select data newer than last 8 days and older than last 4 days
not in between the pastSelects data outside of a range of two time intervals in the pastnot in between the past 4 - 8 days Select data older than the last 8 days and newer than the last 4 days
not withinSelects data outside of a specific number of units of time in the pastnot within the past 2 weeks: Select data older than 2 weeks
thisSelects data from the current unit of time onlythis hour: Select data from the current clock hourthis day: Select data from the current calendar daythis quarter: Select data from the current calendar quarter
this(legacy)Selects data from the current unit of timethis (legacy): Select data from the current hour without an upper time bound on a future time
todaySelects data from the current day onlytoday: Select data from the current day only
today and beyondSelects data from the current daytoday and beyond: Select data from the current day without an upper time bound on future time.
within nextSelects data within a specific number of units of time in the futurewithin next 4 months: Select data from the next 4 calendar months
within pastSelects data within a specific number of units of time in the pastwithin past 4 months: Select data from the last 4 calendar months
within(legacy)Selects data within a specific number of units of time in the pastwithin(legacy) 4 months: Select data from the last 4 calendar months without an upper time bound on future time
yesterdaySelects data from the previous dayyesterday: Select data from the previous day

Fixed Timestamp Operators

OperatorDescriptionExample
> after dateSelects data after a specific date and time> after 2023-01-01 12:00:00: Select data after January 1st, 2023 at noon
< before dateSelects data before a specific date and time< before 2023-01-01 12:00:00: Select data before January 1st, 2023 at noon< before 2023-01-01: Select data before January 1st, 2023
<-> between datesSelects data between two specific dates or times<-> between 2023-01-01 12:00:00 and 2023-02-01 12:00:00: Select data between January 1st, 2023 at noon and February 1st, 2023 at noon<-> between 2023-01-01 and 2023-02-01: Select data between January 1st, 2023 and February 1st, 2023
! <-> not between datesSelects data outside of two specific dates and times!<-> not between 2023-01-01 12:00:00 and 2023-02-01 12:00:00: Select data before January 1st, 2023 at noon or after February 1st, 2023 at noon
not on dateSelects data on dates other than a specific date≠ not on 2023-01-01: Select data on all dates except January 1st, 2023
= on dateSelects data from a specific dateon 2023-01-01: Select data on January 1st, 2023
on or after dateSelects data on or after a specified date.≥ on or after 2023-01-01: Select data on or after January 1st, 2023
on or before dateSelects data on or before a specified date.≤ on or before 2022-12-31: Select data on or before December 31st, 2022