Segmenting with dates reference

read
Last updated at:

You will learn

Learn how date-based segment conditions work in Klaviyo. Date-based segments are powerful tools to develop a better understanding of your subscribers. You can create segments of recent purchasers or site visitors, subscribers who have a birthday this month, and more. 

General guidelines for building date-based segments

Date properties that do not have a timestamp set will assume the default timestamp of 00:00:00. This means that segment options that look backward from today (e.g., “is in the last,” “day is in the last”) will include profiles with today’s date, as long as no timestamp is specified. Segment options that look forward from today (e.g., “is in the next,” “day is in the next”) will exclude profiles with today’s date if no timestamp is specified. 

If the date property does include a timestamp, profiles will be evaluated for the segment based on whether the date and time fall within the segment definition. 

Note that timestamps in profiles are displayed in your account’s timezone, but the segment builder evaluates profiles based on UTC. If your company is not based in a UTC location, some profiles may not be included in your segments as expected. If this happens, expand the date range used in your segment. 

Segmentation options for profile properties

Date-based profile properties, like a profile’s creation date or birthday, can be accessed and used in the segment builder by selecting the rule Properties about someone and choosing a date property. Then, select a date or date range for your definition. 

A segment based on the Birthday property

Conditions based on a specific date

These conditions look for a specific date or time, or a specific range of dates or times. With these definitions, the year of the date is taken into consideration (along with the month, day, and timestamp). 

  • is in the last
    Includes all profiles with date in the last X hours, days, or weeks. Includes today and the date that is the selected number of days in the past. 
  • is at least
    Includes all profiles whose date is at least X hours, days, or weeks in the past. 
  • is between
    Includes profiles that took the designated action between X and Y hours, days, or weeks ago. For the purpose of this segment, days start and end at midnight UTC, and the segment will include profiles that took the action on the start date, end date, or any days between. 
  • is in the next
    Includes profiles with a date in the next X hours, days, or weeks. If a profile contains today’s date without a timestamp, that profile will not be included in the segment, because the assumed timestamp will be in the past at the time the segment is run. 
  • is before
    Includes profiles with a date prior to a selected date, excluding the date itself. 
  • is after
    Includes profiles with a date after a selected date, including the date itself. 
  • is between dates
    Includes profiles with a date between a set of dates, inclusive of the start date, but exclusive of the end date.

Conditions that ignore a date’s year

These conditions consider a date’s month, day, and time, but not the date’s year. Use these conditions for segments based on birthdays, anniversaries, or other milestones that recur annually. 

  • day is today
    Includes profiles with a date that matches today, regardless of year. 
  • day is in the next
    Includes profiles with a date in the next X hours, days, or weeks, excluding today, regardless of year. 
  • day is in the last
    Includes profiles with a date in the last X hours, days, or weeks, including today, regardless of year. 
  • day is in this month
    Includes profiles with a date in the current month, regardless of year. 
  • day is in month of
    Includes profiles with a date in the selected month, regardless of year. 

Segmentation options for metrics (events)

All metrics on a profile include a timestamp indicating when the event occurred. You can build segments based on metrics that occurred during a specific period by using the segment rule What someone has done (or not done), then selecting your metric. By default, the condition over all time will be used, and you can change the date range using that dropdown. 

A segment based on an event, filtered by dates

  • over all time
    Includes all profiles containing metrics that meet your segment criteria, regardless of when the metric occurred. 
  • in the last
    Includes all profiles containing metrics timestamped in the last X hours, days, or weeks. Includes today and the date that is the selected number of days in the past. 
  • between
    Includes profiles that took the designated action between X and Y hours, days, or weeks ago. For the purpose of this segment, days start and end at midnight UTC, and the segment will include profiles that took the action on the start date, end date, or any days between. 
  • before
    Includes profiles who took an action prior to a specific date, not including the date itself. 
  • after
    Includes profiles who took an action after a specific date, not including the date itself. 
  • between dates
    Includes profiles that took an action between a set of dates, including both selected dates. 

Segmentation options for list subscriptions

To create a segment of profiles who subscribed to a list on a specific date (or within a date range), use this rule: 

If someone is in or not in list > is in list [your list] 

Then, add a By Date Added filter. 

A segment condition based on list membership

The date options available in this segment are: 

  • In the last
    Includes profiles who joined the list in the last X hours, days, or weeks, including the selected date. 
  • More than
    Includes profiles who have been in the list for more than X hours, days, or weeks, not including the selected date.
  • At least
    Includes profiles who were added to your list more than X hours, days, or weeks ago, not including the selected date. 
  • Between
    Includes profiles who were added between X and Y hours, days, or weeks ago, including the start date, but not including the end date. 
  • Before
    Includes profiles who were added before a specific date, not including the date itself. 
  • After
    Includes profiles who were added after a specific date, not including the date itself. 
  • Between dates
    Anyone who joined the list between the dates you select (inclusive of the start date, and exclusive of the end date).

Rare dates 

If a profile contains a leap day as the value of a date property, the profile will only be included in segments where it exactly matches the criteria. For example, if your segment contains the condition Properties about someone > [Date Property] > is in the last 10 days, profiles with a leap day date will only qualify in leap years.

If the condition does not specify a specific date or number of days (e.g., Properties about someone > [Date property] > Day is in month of > February), leap days will be included.

Additional resources 

x
Was this article helpful?
24 out of 33 found this helpful