# Date format strings are no longer interchangeable between snake\_case and camelCase

**URL:** <https://discuss.elastic.co/t/date-format-strings-are-no-longer-interchangeable-between-snake-case-and-camelcase/235621>\
**Category:** Elasticsearch\
**Created:** [June 3, 2020, 7:22pm UTC](https://discuss.elastic.co/t/date-format-strings-are-no-longer-interchangeable-between-snake-case-and-camelcase/235621 "2020-06-03T19:22:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kstevens715](https://avatars.discourse-cdn.com/v4/letter/k/a6a055/32.png) [@kstevens715](https://discuss.elastic.co/u/kstevens715)\
**Post date:** [June 3, 2020, 7:22pm UTC](https://discuss.elastic.co/t/date-format-strings-are-no-longer-interchangeable-between-snake-case-and-camelcase/235621/1 "2020-06-03T19:22:45Z")

</div>

After upgrading from ES 7.5.2 to 7.6.1, I found that a date format string of `dateOptionalTime` is no longer interchangeable with `date_optional_time`. In 7.5.2 this works fine. In 7.6.2 (and subsequently confirmed the same problem in 7.7.1), however, I get the following error:

```json
{
  "error" : {
    "root_cause" : [
      {
        "type" : "illegal_argument_exception",
        "reason" : "Mapper for [vehicles.created_at] conflicts with existing mapping:\n[mapper [vehicles.created_at] has different [format] values]"
      }
    ],
    "type" : "illegal_argument_exception",
    "reason" : "Mapper for [vehicles.created_at] conflicts with existing mapping:\n[mapper [vehicles.created_at] has different [format] values]"
  },
  "status" : 400
}

```

I searched existing issues and did not see any mention of this. The following Kibana commands can be used to reproduce the problem in 7.6.2 or 7.7.1. They work fine in 7.5.2:

```json
DELETE /example

PUT /example

PUT /example/_mapping
{
  "properties": {
  "vehicles" : {
          "type" : "nested",
          "properties" : {
            "created_at" : {
              "type" : "date",
              "format" : "dateOptionalTime"
            }
          }
        }
  }
}

PUT /example/_mapping
{
  "properties": {
  "vehicles" : {
          "type" : "nested",
          "properties" : {
            "created_at" : {
              "type" : "date",
              "format" : "date_optional_time"
            }
          }
        }
  }
}

```

---

<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:** [July 1, 2020, 7:22pm UTC](https://discuss.elastic.co/t/date-format-strings-are-no-longer-interchangeable-between-snake-case-and-camelcase/235621/2 "2020-07-01T19:22:46Z")

</div>

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