# Change date format on an existing field

**URL:** https://discuss.elastic.co/t/change-date-format-on-an-existing-field/79265
**Category:** Elasticsearch
**Created:** [March 20, 2017, 1:59pm UTC](https://discuss.elastic.co/t/change-date-format-on-an-existing-field/79265 "2017-03-20T13:59:14Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Pasquale\_Lodise](https://avatars.discourse-cdn.com/v4/letter/p/977dab/32.png) [@Pasquale\_Lodise](https://discuss.elastic.co/u/Pasquale_Lodise)
#### Post date: [March 20, 2017, 1:59pm UTC](https://discuss.elastic.co/t/change-date-format-on-an-existing-field/79265/1 "2017-03-20T13:59:14Z")

</div>

Hi all,

i have this field:

> "\_source": {  
> "etl\_timestamp": "2015-03-03T15:10:00.000Z",  
> "ggsn\_mcc\_mnc": "240",  
> "ggsn\_ip\_address": "62.140.134.92",  
> "data\_center": null,  
> "bytes\_transferred\_output": 42,  
> "bytes\_transferred\_input": 923,

I want change the date format of etl\_timestamp field.  
I've done the following HTTP PUT request

> PUT /my\_index  
> {  
> "mappings": {  
> "data": {  
> "properties": {  
> "etl\_timestamp": {  
> "format": "yyyy/MM/dd HH:mm:ss"  
> }  
> }  
> }  
> }  
> }

but it give me this error:

> {  
> "error": {  
> "root\_cause": [  
> {  
> "type": "index\_already\_exists\_exception",  
> "reason": "index [diameter\_metrics/q8InSAeASDmJHC3lXo73AQ] already exists",  
> "index\_uuid": "q8InSAeASDmJHC3lXo73AQ",  
> "index": "my\_index"  
> }  
> ],

How i can change date format on the ETL\_TIMESTAMP field?

thanks in advice.

---

<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: [March 20, 2017, 2:10pm UTC](https://discuss.elastic.co/t/change-date-format-on-an-existing-field/79265/2 "2017-03-20T14:10:09Z")

</div>

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

Or use markdown style like:

````
```
CODE
```

````

You can't. You need to reindex.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [April 17, 2017, 2:10pm UTC](https://discuss.elastic.co/t/change-date-format-on-an-existing-field/79265/3 "2017-04-17T14:10:30Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
