# Reformat timestamp attributes

In Customer.io Journeys, 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 Person* action to reformat your timestamps.

## 1\. Create a segment with the attribute you want to reformat[](#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%20Shot%202020-07-29%20at%202.28.08%20PM.png)](#66e61882732fde07d4ac06817042488d-lightbox)

## 2\. Create a campaign using your new segment[](#2-create-a-campaign-using-your-new-segment)

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

## 3\. Use the Create or Update Person action to fix the typo[](#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](/journeys/liquid-tag-list/#date).

 JavaScript

#### JavaScript[](#JavaScript)

```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)](#f35f23e52dd4367c522ad8927cbc9cec-lightbox)

 Liquid ISO date-time

#### Liquid ISO date-time[](#Liquid ISO date-time)

```fallback
// 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)](#75ff58f4c0f08a137fb562f4ea9fd2f1-lightbox)

 Liquid ISO date-only

#### Liquid ISO date-only[](#Liquid ISO date-only)

```fallback
// 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)](#6a1bc7655cba338ab1b62740f2b8e2a1-lightbox)

## 4\. Start your campaign[](#4-start-your-campaign)

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

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