# Issue with date format change while reindexing

**URL:** <https://discuss.elastic.co/t/issue-with-date-format-change-while-reindexing/169590>\
**Category:** Elasticsearch\
**Created:** [February 22, 2019, 2:00pm UTC](https://discuss.elastic.co/t/issue-with-date-format-change-while-reindexing/169590 "2019-02-22T14:00:50Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 22, 2019, 3:34pm UTC](https://discuss.elastic.co/t/issue-with-date-format-change-while-reindexing/169590/6 "2019-02-22T15:34:18Z")

</div>

Please format your code, logs or configuration files using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) and not the citation button. It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

This is the icon to use if you are not using markdown format:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/e/7e6e239431ec2d71cbf1beef741f2e93e7cc762c.jpg)

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.  
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.  
Please update your post.

Here you set that you read from `person.birthDate` and write to `timestamp` but you did not change or remove `person.birthDate` which is still incorrect.

You should use the `_simulate` API to see exactly what you are doing before run the reindex operation.  
And it's probably not as straightforward as you think it is. The date processor helps to parse a string and make it a date. It does not help to render the field with the format you wish AFAIK.

But why do you want to change the date format after all? Could you explain it?  
Is that for display purpose? Can 't you solve that at render time? I mean that a date is a date in elasticsearch whatever its format in the `_source` document.

If it's about inserting data, then your field can support multiple formats. See [https://www.elastic.co/guide/en/elasticsearch/reference/master/date.html#multiple-date-formats](https://www.elastic.co/guide/en/elasticsearch/reference/master/date.html#multiple-date-formats). In which case you don't even need to reindex the data.

---

_[View the full topic](https://discuss.elastic.co/t/issue-with-date-format-change-while-reindexing/169590)._
