Timestamp Conditions FAQ

Why don’t people match my Signed Up segment even after I sent in created_at timestamps?

In order for any timestamp rule to work, you need to send the timestamps in unix (seconds since epoch) format. If you are sending timestamps in milliseconds or if you’re using a different timestamp format like ISO 8601, your users will not match.

Correct: 1461866400 (April 28, 2016, 6:00:00 pm)

Incorrect - milliseconds: 1461866400000

Incorrect - ISO 8601: 2016-04-28T18:00:00Z

Incorrect - RFC 2822: Thu, 28 Apr 2016 18:00:00 +00:00

 Future timestamp values may not trigger campaigns immediately

If you trigger a campaign based on membership in the Signed Up segment and you set a person’s created_at to a future timestamp value, that person won’t trigger campaigns based on the Signed Up segment until then unless you explicitly include future dates in your trigger conditions.

See Segment-triggered campaigns and future timestamps for more information.

Special notes

  • You can easily notice if your timestamp is in the correct format or not by the fact that the human readable date and time will appear next to the epoch value in the user interface.
image.png
image.png

I’m using a timestamp rule for my campaign trigger, but users are only receiving the first message.

Timestamp rules can get tricky. Some of them allow users to exit a segment, while others include them in a segment until the timestamp changes. Here are the rules we have:

image.png
image.png

If you’re using one of the rules that allow users to exit, make sure that the user will still be in the segment after any delay.

These rules are for segment entry

  • is a timestamp: when someone matches this condition, they will enter the segment, but not exit. You can add multiple messages with different delays and the user will receive them.
  • is a timestamp before a relative date of X days from now: when they match, the user will enter the segment, but not exit. You can add multiple messages with different delays and the user will receive them.
  • is a timestamp before a relative date of X days ago: when they match, the user will enter the segment, but not exit. You can add multiple messages with different delays and the user will receive them.
  • is a timestamp is before a specific date of X: If the timestamp value doesn’t change, the user will enter the segment when they match, but not exit. You can add multiple messages with different delays and the user will receive them.
  • is a timestamp is after a specific date of X: If the timestamp value doesn’t change, the user will enter the segment when they match, but not exit. You can add multiple messages with different delays and the user will receive them.
  • is a timestamp between X date and Y date: If the timestamp value doesn’t change, the user will enter the segment when they match, but not exit. You can add multiple messages with different delays and the user will receive them.

These rules allow for segment exit

  • is a timestamp after a relative date of X days from now: The user will exit the segment as soon as there are less than X days left until the date specified. So if your day is one week (7) days from now, then the user will exit the segment as soon as the timestamp is less than seven days away.
  • is a timestamp after a relative date of X days ago: The user will exit the segment as soon as more than X days passed your date. For example, if your date is today and the rule is seven days from now, they will exit the segment as soon as seven days passes.

How do I message users whose timestamps are before/after a specific date?

You can use the condition is a timestamp before a specific date of to target before a specific date. Use the condition is a timestamp after a specific date of to target after a specific date and compare against your chosen date.

is a timestamp before X date

is a timestamp before a specific date of X will match users whose date is before X. Use this condition if you want to send messages to users for whom an attribute is a timestamp before a date.

For example, say you want to send a message to people who signed up for your app before Nov 30, 2019. This is how you would do that:

is_a_timestamp_before_x_date.png
is_a_timestamp_before_x_date.png

This segment includes all the people who signed up before the timestamp 1575158400: November 30th, 2019, 12:00:00 GMT.

is a timestamp after X date

is a timestamp after a specific date of X will match users whose date is after X. Use this condition if you want to send messages to users for whom an attribute is a timestamp after a date.

For example, say you want to send a message to people who signed up for your app after December 1st, 2019. This is how you would do that:

is_a_timestamp_after_x_date.png
is_a_timestamp_after_x_date.png

This segment includes all the people who signed up after the timestamp 1575158400: November 30th, 2019, 12:00:00 GMT.

What timezone are you using to display timestamps?

Inside Customer.io, the timestamp values are dictated by the timezone settings of your computer/laptop. If you change your settings, the values shown in the user interface will update accordingly.

How do I create a segment that only has new users from a certain fixed date (e.g. April 1, 2017)?

If you are using the created_at attribute with Epoch Timestamp values, you can segment based on that timestamp as seen in the image below. So, using April 1 2017 as an example, you would convert that date to an Epoch Timestamp and then enter that value for comparison against the created_at timestamp of your users.

Note, the timestamp value pictured below (1491022800) is GMT: Sat, 01 Apr 2017 05:00:00 GMT. You can use https://www.epochconverter.com/ to convert to your desired date and timezone and adjust that value accordingly to meet your data requirements.

image.png
image.png

That segment will contain only people created after April 1, 2017.

How do I convert timestamps back to readable dates and times?

When you export information out of Customer.io, you will see dates and times as unix timestamps. Here’s how to convert timestamps to a readable format in Microsoft Excel.

Conversion formula

=(((A1/60)/60)/24)+DATE(1970,1,1)

This assumes that A1 is the cell with the epoch number. Then, format the result cell or column of cells for date (and time). By default, this conversion is for GMT.

Converting to your time zone

If you’d like to see the result in your time zone, add your time zone’s UTC offset into the formula:

=(((A1/60)/60)/24)+DATE(1970,1,1)+(-[YOUR OFFSET HERE]/24)

For example, to convert timestamp data to Eastern Time, where the offset is -5:

=(((A1/60)/60)/24)+DATE(1970,1,1)+(-5/24)

Here’s a list of UTC offsets.

Copied to clipboard!