# Mapper\_parsing\_exception on Date

**URL:** <https://discuss.elastic.co/t/mapper-parsing-exception-on-date/183068>\
**Category:** Elasticsearch\
**Created:** [May 28, 2019, 10:50am UTC](https://discuss.elastic.co/t/mapper-parsing-exception-on-date/183068 "2019-05-28T10:50:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![broly21](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/broly21/32/46716_2.png) [@broly21](https://discuss.elastic.co/u/broly21)\
**Post date:** [May 28, 2019, 10:50am UTC](https://discuss.elastic.co/t/mapper-parsing-exception-on-date/183068/1 "2019-05-28T10:50:33Z")

</div>

hello everyone, I have an error when I insert my data, because of my bad mapping.  
the format is 31/12/2018 for exemple

Here is the error

{  
"error": {  
"root\_cause": [  
{  
"type": "mapper\_parsing\_exception",  
"reason": "No handler for type [DATE] declared on field [DATE\_JOUR]"  
}  
],  
"type": "mapper\_parsing\_exception",  
"reason": "No handler for type [DATE] declared on field [DATE\_JOUR]"  
},  
"status": 400  
}

here is the mapping:  
"DATE\_JOUR": {  
"type": "DATE",  
"format": "dd-mm-yyyy"  
}

does anyone have an idea of where the mistake comes from?

---

<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:** [May 28, 2019, 11:30am UTC](https://discuss.elastic.co/t/mapper-parsing-exception-on-date/183068/2 "2019-05-28T11:30:14Z")

</div>

Change `"type": "DATE"` by `"type": "date"`

---

<div class="post-metadata">

**Author:** ![broly21](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/broly21/32/46716_2.png) [@broly21](https://discuss.elastic.co/u/broly21)\
**Post date:** [May 28, 2019, 12:12pm UTC](https://discuss.elastic.co/t/mapper-parsing-exception-on-date/183068/3 "2019-05-28T12:12:20Z")

</div>

it's work thank you.  
But when i put json data with this date "DATE\_JOUR":"2018-02-28 00:00:00.0"  
i have this error :  
String value: failed to parse field [DATE\_JOUR] of type [date] in document with id 'ibzq\_WoBlHm1\_K3edXic'

it's not possible post this format ? and elasticsearch keep only the days, months and year

---

<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:** [May 28, 2019, 12:43pm UTC](https://discuss.elastic.co/t/mapper-parsing-exception-on-date/183068/4 "2019-05-28T12:43:13Z")

</div>

Don't send `2018-02-28 00:00:00.0` if you just want to store `2018-02-28`.

The `date` mapping just helps to read your initial format. It does not transform the JSON you are providing.

---

<div class="post-metadata">

**Author:** ![broly21](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/broly21/32/46716_2.png) [@broly21](https://discuss.elastic.co/u/broly21)\
**Post date:** [May 28, 2019, 12:45pm UTC](https://discuss.elastic.co/t/mapper-parsing-exception-on-date/183068/5 "2019-05-28T12:45:40Z")

</div>

ok thank you for your help 😀

---

<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:** [June 25, 2019, 12:51pm UTC](https://discuss.elastic.co/t/mapper-parsing-exception-on-date/183068/6 "2019-06-25T12:51:45Z")

</div>

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