> This page is part of the [Customer.io documentation](https://docs.customer.io). For the complete index, see [llms.txt](https://docs.customer.io/llms.txt).

# Reformat timestamp attributes

In Customer.io, you need to format timestamps as Unix epochs to full take advantage of them. If you've already uploaded data with timestamps in a different format, you can use the *Create or Update Profile* action to reformat your timestamps.

## 1\. Create a segment with the attribute you want to reformat

When you create your segment, you can use the *is not a timestamp* condition. This makes sure that you only update attributes that aren’t formatted correctly.

 ![Screen Shot 2020-07-29 at 2.28.08 PM](https://docs.customer.io/images/Screen Shot 2020-07-29 at 2.28.08 PM.png)

## 2\. Create an automation using your new segment

When you create your automation make the automation re-enterable, so you can reformat the timestamp whenever it appears. This automation won’t send any messages, so you’ll want it to “send” to unsubscribed profiles as well.

## 3\. Use the Create or Update Person action to fix the typo

The only action in your workflow should be a *Create or Update Person* block. You’ll replace the current attribute value with a properly formatted timestamp using Liquid filters or JavaScript.

In this example, we’re assuming that our initial value is an ISO date or date-time. If you use Liquid, your code changes depending on whether your initial value is a complete ISO-8601 timestamp or a date-only value in YYYY-MM-DD format. For more about converting dates using Liquid, see our [Liquid documentation](/messaging/liquid/tag-list/#date).

JavaScriptLiquid ISO date-timeLiquid ISO date-only

#### JavaScript

```
return new Date(customer.date_of_birth).getTime() / 1000;
```

 ![fix date-time values with JavaScript](https://docs.customer.io/images/fix-datetime-js.png)

#### Liquid ISO date-time

```
// if date_of_birth has a value like: "1983-03-15T12:00:00Z"
{{customer.date_of_birth | date: "%s"}}
```

 ![fix date-time values with liquid](https://docs.customer.io/images/fix-datetime-iso-liquid.png)

#### Liquid ISO date-only

```
// if date_of_birth has a value like: "1983-03-15"
{{customer.date_of_birth | append: " 12:00:00" | date: "%Y-%m-%d %H:%M:%S" | date: "%s"}}
```

 ![fix date-time values with liquid](https://docs.customer.io/images/fix-datetime-liquid.png)

## 4\. Start your automation

On the review page, select *Current profiles and future additions*, so that you correct the timestamp on all current and future profiles.

 ![set your automation to capture future profiles](https://docs.customer.io/images/campaign-match-current-future-people.png)

©2026 Peaberry Software, Inc. [Status](https://status.customerio.com/) [Terms of Service](https://customer.io/legal/terms-of-service/) [Privacy Policy](https://customer.io/legal/privacy-policy/)

[](https://www.linkedin.com/company/customer-io)[](https://twitter.com/customerio)[](https://www.youtube.com/channel/UCkCaWdezRoa8ZyR9pEVaipA)[](https://www.instagram.com/customer.io/)
