# Change timestamp format for existing index

**URL:** https://discuss.elastic.co/t/change-timestamp-format-for-existing-index/195593
**Category:** Elasticsearch
**Created:** [August 17, 2019, 11:09am UTC](https://discuss.elastic.co/t/change-timestamp-format-for-existing-index/195593 "2019-08-17T11:09:13Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![NominaSumpta](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nominasumpta/32/52412_2.png) [@NominaSumpta](https://discuss.elastic.co/u/NominaSumpta)
#### Post date: [August 17, 2019, 11:09am UTC](https://discuss.elastic.co/t/change-timestamp-format-for-existing-index/195593/1 "2019-08-17T11:09:13Z")

</div>

I read the `date` time is one of the only mappings that **can be altered for an existing index**. I'm attempting to alter the `date` format as follows:

```
curl http://localhost:9200/web/_mapping/_timestamp?include_type_name=true -X PUT --header "Content-Type: application/json" -d "`cat thing`"

{
  "timestamp": {
    "properties": {
      "format": "basic_date_time_no_millis"
    }
  }
}

```

The Elasticsearch API is giving me:

```
{
  "error": {
    "root_cause": [
      {
        "type": "mapper_parsing_exception",
        "reason": "Root mapping definition has unsupported parameters: [timestamp : {properties={format=basic_date_time_no_millis}}]"
      }
    ],
    "type": "mapper_parsing_exception",
    "reason": "Root mapping definition has unsupported parameters: [timestamp : {properties={format=basic_date_time_no_millis}}]"
  },
  "status": 400
}

```

What am I doing wrong?

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [August 19, 2019, 7:20am UTC](https://discuss.elastic.co/t/change-timestamp-format-for-existing-index/195593/2 "2019-08-19T07:20:24Z")

</div>

this used to work in earlier versions of elasticsearch, but due to issues this has been removed in more recent versions.

Creating a new index with the new mapping and reindexing sounds like the best approach here to me.

---

<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: [September 16, 2019, 7:20am UTC](https://discuss.elastic.co/t/change-timestamp-format-for-existing-index/195593/3 "2019-09-16T07:20:27Z")

</div>

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