DateTime User Attribute
This guide explains how to target users in the Audience Builder using User Attribute with Datetime.
Getting Started
First, we need to make sure that you're uploading your datetime user attribute following a supported format. Most of the formats in ISO-8601 can be used, here are some examples
1989-04-21
1989-04-21T22:00:00.000Z
1989-04-21 20:30:00 UTC
1989-04-21 20:30:00
1989-04-21T20:30:00.000000+03:00
04/23/1999
21.04.1999
2020-03-20 12:00:00 AM UTC
04/23/1999 20:30:04 +02:00
21.04.1999 20:30:04 +02:00
In this example, we use the datetime attribute "birthday" with an example value of "1989-04-21" or "1989-04-21T22:00:00.000Z."
Delivery times
Datetime segmentation currently doesn't work with the user timezone and optimal timezone delivery methods.
Create An Audience
- Navigate to the Audiences page from the navigation.
- Click Create Audience from the header to start building your audience.
- Add a rule from the Builder, and select "User attribute".
- Add the user attribute you want to segment by, which in our example is "birthday".
- Select "Datetime" from the attribute type dropdown.
Datetime Types
We offer a flexible way to match datetime in the user attribute. In addition to matching using a relative or an exact date, we added the possibility of matching with day/month. We will be demonstrating various examples focusing mainly on the birthday use case.
Examples
I want to target all users who have a birthday on the 21st of April 1989.
A straightforward use case would be to target users who have a birthday on a specific date and a specific year. We will choose an exact date with day/month/year and enter the full date.
This will target users who are born in 1989. Let's say John was born on the 21st of April 1989, and Jessica was born on the 21st of April 1992. In this case, we will only target John.
I want to target all users who have a birthday on the 21st of April.
To target both John and Jessica from the previous example, we will choose an exact date with day/month and select "is 21 April". This rule only looks at the date and month and will target both John and Jessica as they both have a birthday on the 21st of April.
I want to target all users who have a birthday today.
This is where relative dates come in handy. We will choose a relative date with day/month since we want to ignore the year and target everyone who has a birthday today, no matter what year they were born, and then select "is today".
When using time operators such as is before/is after in combination with day/month for relative and exact, the comparison will be on a one-year calendar timeline.
Example: Birthday is before 21st of April will match all users who have a birthday between the 1st of January and 21st of April.
I want to target all users who are 18 years and older.
Relative dates can be used also to target users under or over a specific age.
Let's say you want to target users who are 18 years or older. In this case, we will choose a relative date with day/month/year, and then select "is before 18 years ago".
Relative Date Units
If now = 20 April, 2021 11:30PM UTC
- hours — 24 hours ago UTC = 19 April, 2021 11:30PM UTC
- days — 1 day ago UTC = 19 April, 2021 00:00AM UTC
Timezones
We support targeting by a specific timezone to achieve precise results.
Updated 11 months ago