When creating or editing a segment, if you add a date-based profile property as a condition, various filters display so you can find property values within a range of days, a range of hours, or before/after a certain time of day. For instance, if you want to create a segment of first-time website visitors starting this year, add the “First visited date” property and use the provided filters to specify that a profile only belongs to your segment if their first visit was after January 1.
Use cases for date- and time-based segmentation
These filters are also important in the execution of several high-priority use cases. For example, when analyzing cart abandonment, you can determine which profiles abandoned a shopping cart within a certain timeframe (e.g., the last two hours) and then reach out to them via email.
The following sample shows what date and time filters you can use to create a segment of cart abandoners:
Here you want customers who:
- Visited your site within the last two hours (but not the most recent hour).
- Had at least two items in their cart.
- Didn't order anything during their visit time.
Using date and time filters
After adding your date-based profile property as a condition, a page opens with its various date and time filters. At the top is a Date setting to determine how the property’s date values should be configured. It must be set to one of these options:
- In range: The date value for this property must be within a specified timeframe that you define. (This is the default option.)
- Not in range: The date value for this property must not be within a specified timeframe that you define.
- Is empty: This property cannot have any date value.
- Has a value: This property must have a date value.
Selecting fixed-date and relative-date options
When the Date setting is either in range or not in range, a dropdown appears underneath with several options to define that range. Some of these options are fixed-date (i.e., you set static dates/time for the range), while others are relative-date (i.e., you set a range relative to the current date/time).
The five options in the dropdown are:
- Between: A fixed-date option to find values between a specific start date/time and a specific end date/time.
- After: A fixed-date option to find values after a specific date/time.
- Before: A fixed-date option to find values before a specific date/time.
- Within last: A relative-date option to find values within a certain number of days or hours before the current date/time (e.g., a profile who first visited your website within the last 24 hours).
- Within next: A relative-date option to find values within a certain number of days or hours after the current date/time.
Using fixed-date filters
Whenever you select “Between,” “After,” or “Before” from the dropdown, selectors for both date and time appear next to it, allowing you to choose a specific hour on a particular date. For instance, if you’re looking to determine which profiles last visited your site after February 1, you can add the “Last visited date” property as a condition, set the dropdown to “After,” and set the date/time to February 1, 12:00 AM.
Notes:
- Once you make a date selection, the corresponding time selector defaults to 12:00 AM (or 0:00 if using a different locale via Account settings). That time will be used if you do not make a time selection.
- A full hour always begins at the :00 mark and ends at the :59 59 999 mark, leaving off the last millisecond. (For readability purposes, it will be referred to as the :59 mark for the remainder of this article.)
- BlueConic segment filters are calculated via Solr which rounds down date times, so when segmenting on the last hour, the segment will consist of all dates for that hour.
Understanding how fixed-date filters are calculated
For these fixed-date options, dates/times are calculated based on the local time zone of the user who configured the segment (which is retrieved through their browser setting). However, they’re stored in UTC (Coordinated Universal Time) so that if another user views the segment, dates/times are shown in their local time zone.
For instance, if a user in Amsterdam configures a condition on December 1 at 5:30 AM in their Central European Time zone, another user in New York will see that time displayed as November 30 at 11:30 PM in their Eastern Standard Time zone. (Those dates/times will be formatted based on each user’s individual locale in Account settings, e.g., “11/30/2023 11:30 PM,” "30-11-2023 23:30.”)
Note: When using the time selector, you can only select increments of one hour; for users in most time zones, this is the beginning (:00 mark) of the hour. However, for those in a zone with either a 30-minute or 45-minute offset (e.g., Eucla, Australia, UTC +8:45), times are displayed as XX:30 or XX:45. For instance, those in Eucla would see options for 12:45, 1:45, 2:45, 3:45, etc.
Using relative-date filters
Whenever you select “Within last” or “Within next” from the dropdown, fields open for you to input an exact number of days or hours from the current date/time (all based on UTC). There are three different time measurements to choose from:
- Calendar days (UTC): The number of full days–i.e., from 12:00 AM to 11:59 PM–before or after the current date/time (in your local time zone).
- Days (24 hours): The number of 24-hour increments before or after the current date/time (in your local time zone). This is the default option.
- Hours: The number of full hours before or after the current date/time (in your local time zone).
When the system does its calculation for any of these options, times are always rounded down to the hour for the most optimal segmentation. As a result, any daily or hourly range you set will include extra rounding time.
For instance, if you set a condition on August 19 at 9:45 AM for “Within next 2 calendar days (UTC),” the system collects values starting at the beginning of that hour, 9:00 AM (45 minutes earlier).
Notes:
- For any segments configured before the April 2024 release, the previous options “Last _ days” and “Next _ days" now use "calendar days (UTC)."
- UTC does not observe or recognize daylight saving time or any form of summer or winter time adjustments.
Understanding how relative-date filters are calculated
Working off the previous example, if you configure your segment on August 19 at 9:45 AM and set the condition to "Within next 2 calendar days (UTC),” the system will:
- Start collecting values at the :00 mark of the current hour: August 19, 9:00 AM.
- Collect values for two calendar days after that point (i.e., August 20 and 21).
- End at 11:59 PM on the second calendar day: August 21, 11:59 PM.
As another example, if you configure your segment on April 2 at 4:35 PM and set the condition to "Within last 2 days (24 hours)," the system will:
- Start collecting values from 48 hours prior, at the :00 mark of that hour: March 31, 4:00 PM.
- Collect values for that two-day timeframe.
- End at the :59 mark of the current hour: April 2, 4:59 PM.
The following chart breaks down exactly how the system calculates each of the three time measurements with both “Within last” and “Within next."
Within last:
- Calendar days (UTC):
- Start: 12:00 AM of the current day minus (-) the number of calendar days you input.
- End: The end of the current hour (:59 mark).
- Example: A condition within the last 2 calendar days (UTC) configured on November 4, 10:55 AM includes values between November 2, 12:00 AM and November 4, 10:59 AM.
- Days (24 hours):
- Start: The beginning of the current hour (:00 mark) minus (-) the number of 24-hour days you input.
- End: The end of the current hour (:59 mark).
- Example: A condition within the last 2 days (24 hours) configured on November 4, 10:55 AM includes values between November 2, 10:00 AM and November 4, 10:59 AM.
- Hours:
- Start: The beginning of the current hour (:00 mark) minus (-) the number of hours you input.
- End: The end of the current hour (:59 mark).
- Example: A condition within the last 2 hours configured on November 4, 10:55 AM includes values between 8:00 AM and 10:59 AM on November 4.
Within next:
- Calendar days (UTC):
- Start: The beginning of the current hour (:00 mark).
- End: 11:59 PM of the current day plus (+) the number of calendar days you input.
- Example: A condition within the next 2 calendar days (UTC) configured on November 4, 10:55 AM includes values between November 4, 10:00 AM and November 6, 11:59 PM.
- Days (24 hours):
- Start: The beginning of the current hour (:00 mark).
- End: The end of the current hour (:59 mark) plus (+) the number of 24-hour days you input.
- Example: A condition within the next 2 days (24 hours) configured on November 4, 10:55 AM includes values between November 4, 10:00 AM and November 6, 10:59 AM.
- Hours:
- Start: The beginning of the current hour (:00 mark).
- End: The end of the current hour (:59 mark) plus (+) the number of hours you input.
- Example: A condition within the next 2 hours configured on November 4, 10:55 AM includes values between 10:00 AM and 12:59 PM on November 4.
Viewing the date/time preview
To help you better understand these calculations, when you leave or click outside these input fields, a preview immediately appears to the right of the time measurement dropdown with the exact date/time range that would be used (in your local time zone).
For instance, if you configure your segment on December 21, 2024 at 9:48 AM and set the condition to "Within last 2 days (24 hours),” the date/time preview will be:
From 12/19/2024, 9:00 AM until 12/21/2024, 9:59 AM in your local time zone
Similarly, if you configure your segment on March 19, 2025 at 11:51 AM and set the condition to "Within next 2 calendar days (UTC),” the date/time preview will be:
From 3/19/2025, 11:00 AM until 3/21/2025, 11:59 PM in your local time zone
Here are additional relative-date examples:
Current time | Date condition | Start time | End time |
2024/03/02 11:55:57 441 |
Within last 0 calendar days (UTC) |
2024/03/02 00:00:00 000 |
2024/03/02 11:59:59 999 |
2024/03/02 11:55:57 441 |
Within last 1 calendar days (UTC) |
2024/03/01 00:00:00 000 |
2024/03/02 11:59:59 999 |
2024/03/02 11:55:57 441 |
Within last 2 calendar days (UTC) |
2024/02/28 00:00:00 000 |
2024/03/02 11:59:59 999 |
2024/03/02 23:59:59 999 |
Within last 1 calendar days (UTC) |
2024/03/01 00:00:00 000 |
2024/03/02 23:59:59 999 (i.e., almost spans 2 days) |
2024/03/02 00:00:00 000 |
Within last 1 calendar days (UTC) |
2024/03/01 00:00:00 000 |
2024/03/02 00:59:59 999 (i.e., almost spans 25 hours) |
2024/03/02 00:00:00 001 |
Within last 1 calendar days (UTC) |
2024/03/01 00:00:00 000 |
2024/03/02 00:59:59 999 (i.e., almost spans 25 hours) |
2024/03/02 23:59:59 999 |
Within last 0 calendar days (UTC) |
2024/03/02 00:00:00 000 |
2024/03/02 23:59:59 999 (i.e., almost spans 1 day) |
2024/03/02 00:00:00 000 |
Within last 0 calendar days (UTC) |
2024/03/02 00:00:00 000 |
2024/03/02 00:59:59 999 (i.e., almost spans 1 hour) |
2024/03/02 11:55:57 441 |
Within next 0 calendar days (UTC) |
2024/03/02 11:00:00 000 |
2024/03/02 23:59:59 999 |
2024/03/02 11:55:57 441 |
Within next 1 calendar days (UTC) |
2024/03/02 11:00:00 000 |
2024/03/03 23:59:59 999 |
2024/03/02 11:00:00 001 |
Within next 1 calendar days (UTC) |
2024/03/02 11:00:00 000 |
2024/03/03 23:59:59 999 |
2024/03/02 11:55:57 441 |
Within next 2 calendar days (UTC) |
2024/03/02 11:00:00 000 |
2024/03/04 23:59:59 999 |
2024/03/02 11:55:57 441 |
Within last 1 days (24 hours) (i.e., the last 24 hours) |
2024/03/01 11:00:00 000 |
2024/03/02 11:59:59 999 |
2024/03/02 11:55:57 441 |
Within last 2 days (24 hours) (i.e., the last 48 hours) |
2024/02/28 11:00:00 000 |
2024/03/02 11:59:59 999 |
2024/03/02 11:55:57 441 |
Within next 1 days (24 hours) (i.e., the next 24 hours) |
2024/03/02 11:00:00 000 |
2024/03/03 11:59:59 999 |
2024/03/02 11:55:57 441 |
Within next 2 days (24 hours) (i.e., the next 48 hours) |
2024/03/02 11:00:00 000 |
2024/03/04 11:59:59 999 |
2024/03/02 11:55:57 441 |
Within last 1 hour |
2024/03/02 10:00:00 000 |
2024/03/02 11:59:59 999 |
2024/03/02 11:01:57 441 |
Within last 1 hour |
2024/03/02 10:00:00 000 |
2024/03/02 11:59:59 999 |
2024/03/02 11:55:57 441 |
Within next 1 hour |
2024/03/02 11:00:00 000 |
2024/03/02 12:59:59 999 |
2024/03/02 11:01:57 441 |
Within next 1 hour |
2024/03/02 11:00:00 000 |
2024/03/02 12:59:59 999 |
2024/03/02 11:55:57 441 |
Within next 2 hours |
2024/03/02 11:00:00 000 |
2024/03/04 13:59:59 999 |