# Mapper parsing exception for date type

**URL:** <https://discuss.elastic.co/t/mapper-parsing-exception-for-date-type/94992>\
**Category:** Elasticsearch\
**Created:** [July 28, 2017, 5:10pm UTC](https://discuss.elastic.co/t/mapper-parsing-exception-for-date-type/94992 "2017-07-28T17:10:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![matthkang](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@matthkang](https://discuss.elastic.co/u/matthkang)\
**Post date:** [July 28, 2017, 5:10pm UTC](https://discuss.elastic.co/t/mapper-parsing-exception-for-date-type/94992/1 "2017-07-28T17:10:45Z")

</div>

I am trying to send a log with a date value of "yyyy-MM-dd'T'HH:mm:ss.SSSZ" results in an error of MapperParsingException.

Full error message:  
`Failed to index [1] messages. Please check the index error log in your web interface for the reason. Error: failure in bulk execution: [0]: index [graylog_0], type [message], id [9751fd11-7320-11e7-aff3-0242994e81cd], message [MapperParsingException[failed to parse [insertedDtm]]; nested: NumberFormatException[For input string: "2017-07-27T23:08:36.692Z"];]`

I have tried creating custom index mappings with the following format:  
`curl -XPUT localhost:9200/_template/graylog -d ' { "template" : "graylog_*", "mappings" : { "message" : { "properties" : { "insertedDtm" : { "type" : "string", "format" : "yyyy-MM-dd'T'HH:mm:ss.SSSZ" } } } } }`

and also tried to set the index's date detection to false:  
`curl -XPUT "http://localhost:9200/graylog" -d' { "mappings": { "insertedDtm": { "date_detection": false } } }'`

Any help would be greatly appreciated.

---

<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:** [August 25, 2017, 5:11pm UTC](https://discuss.elastic.co/t/mapper-parsing-exception-for-date-type/94992/2 "2017-08-25T17:11:01Z")

</div>

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