Datetime segmentation operators
This article provides a reference for working with dates in segmentation.
Segmentations which work with dates:
- First occurrence
- Last occurrence
- Last session start
- Last session start time
- First run
- Last active
The following operators are available when working with Dates and Times in segmentation:
Operator | Description |
---|---|
Is after | Happened after a particular time. Example: "Last occurrence of Purchase is after 05/26/2020 12:00 AM PST" will include all users whose last purchase happened between May 26 2020 and now. Another way to represent this would be "Last occurrence of Purchase > 05/26/2020 12:00 AM PST". |
Is not after | Happened at or before a particular time. Example: "Last occurrence of Purchase is not after 05/26/2020 12:00 AM PST" will include all users whose last purchase happened at 12:00 AM PST on 05/26/2020 or before that. Another way to represent this would be "Last occurrence of Purchase <= 05/26/2020 12:00 AM PST". |
Is before | Happened before a particular time. Example: "Last occurrence of Purchase is before 05/26/2020 12:00 AM PST" will include all users whose last purchase happened before May 26 2020. Another way to represent this would be "Last occurrence of Purchase < 05/26/2020 12:00 AM PST". |
Is not before | Happened at or after a particular time. Example: "Last occurrence of Purchase is not before 05/26/2020 12:00 AM PST" will include all users whose last purchase happened at 12:00 AM PST on 05/26/2020 or after that. Another way to represent this would be "Last occurrence of Purchase >= 05/26/2020 12:00 AM PST". |
Is between | Happened between two particular times on the calendar. Example: "Last occurrence of Purchase is between 05/20/2020 12:00 AM PST AND 05/26/2020 12:00 AM PST". Another way to represent this would be "05/20/2020 12:00 AM PST < Last occurrence of Purchase < 05/26/2020 12:00 AM PST". Tip: When using "in between", always put the earlier date first. For relative dates that would be "between 10 days ago and 3 days ago". |
Using Exact vs Relative dates
Leanplum lets you chose between using Exact and Relative dates when segmenting based on Datetime properties.
Exact dates work better when building audiences for calendar-driven engagement, such as users who have last logged in before 01/01/2020.
Relative dates are to be preferred when building audiences for automated or triggered campaigns, such as users who purchased last month, but not this month.
Accepted date formats
ISO-8601 supported
Leanplum supports ISO-8601 date formats.
You can track custom dates in Leanplum for user attributes or event parameters.
Updated over 2 years ago