Dashboard
Edit Article Logout

Complex Search Examples


Below are examples of complex searches that are possible with DailyStory.

Working with dates

Dates can be incredibly complex. For example, you may want to find contacts within a specific range of fixed dates such as between July 1, 2025 and July 31, 2025. Or you may want to find contacts within a sliding date range such as within the last 30 days.

Please see the Using Advanced Search article for details on how date syntax works.

For the purposes of the date examples, we'll use the standard field Date Created (dateCreated). However, the examples below apply to any date field including those from an integration.

Below are examples of complex date searches:

Older than a year ago

To find contacts with a field where the value is older than 1 year ago requires direct editing of the search syntax.

When constructing the syntax for this search it is easiest to start with an existing search. For example, using one of the preset search options such as Past 1 Year. Running this search for Date Created generates the following syntax:

$dateCreatedFrom=Past-1-Year&dateCreatedTo=Today

This effectively states: return all contacts from 1 year ago from today's date up to today.

We want to change this to get all contacts older than 1 year ago.

Option 1 - Specify a from and a to

To bound the search to everyone created within the past 10 years older than a year ago:

$dateCreatedFrom=Past-11-Years&dateCreatedTo=Past-1-Year

Option 2 - All records older than a year ago

While setting explicit ranges is usually best, the following is also valid and returns any record older than a year ago:

$dateCreatedTo=Past-1-Year

In the above example, the starting point of the search range (dateCreatedFrom) was removed.

Specific ranges of dates

While the search tools provide options for manipulating dates, some customers have more advanced requirements. For example, when using the Shopify integration, you may want to build a segment that targets customers that purchased in the last 2 days.

For the purpose of our example, we'll use the Date Created contact field.

Contacts created in last 2 days

To accomplish this you will need to directly edit the search criteria:

dateCreatedFrom=yesterday&dateCreatedTo=today

This would return all customers that were created from yesterday until today.

Contacts created within a window of time

Similar to the examples above for finding contacts created over a year ago, you can also specify ranges. Some of these are built in as presents, such as "Between 30 and 60 days ago", but you may want different ranges.

For example, people created within in the past year but older than 45 days:

dateCreatedFrom=past-1-year&dateCreatedToTo=past-45-days

This excludes anyone created in the past 45 days.


How helpful was this article?

πŸ‘ or πŸ‘Ž

Related Articles