# Failed to parse date field from kibana

**URL:** <https://discuss.elastic.co/t/failed-to-parse-date-field-from-kibana/210067>\
**Category:** Kibana\
**Created:** [December 1, 2019, 3:03pm UTC](https://discuss.elastic.co/t/failed-to-parse-date-field-from-kibana/210067 "2019-12-01T15:03:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yoav\_Ben\_Moha](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yoav_ben_moha/32/46202_2.png) [@Yoav\_Ben\_Moha](https://discuss.elastic.co/u/Yoav_Ben_Moha)\
**Post date:** [December 1, 2019, 3:03pm UTC](https://discuss.elastic.co/t/failed-to-parse-date-field-from-kibana/210067/1 "2019-12-01T15:03:18Z")

</div>

I have created a template with 3 fields.  
The last one is DATE format.  
The template index created successfully:

> PUT \_template/test\_index\_template  
> {  
> "index\_patterns" : ["test-\*"],  
> "settings": {  
> "number\_of\_shards": 1,  
> "number\_of\_replicas": 1  
> },  
> "mappings": {  
> "properties": {  
> "FIRST\_NAME": {  
> "type": "text",  
> "fields": {  
> "keyword": {  
> "type": "keyword",  
> "ignore\_above": 256  
> }  
> }  
> },  
> "LAST\_NAME": {  
> "type": "text",  
> "fields": {  
> "keyword": {  
> "type": "keyword",  
> "ignore\_above": 256  
> }  
> }  
> },  
> "COMPETITION\_DATE": {  
> "type": "date",  
> "format" : "dateOptionalTime"  
> }  
> }  
> }  
> }

When i tried to insert one row it failed .  
I have tried to change the mapping to include : "format" : "dateOptionalTime"  
as well see with no date format at all . In both cases it failed:

> POST /test-2019/\_doc/1  
> {  
> "FIRST\_NAME": "aaa",  
> "LAST\_NAME": "bbbb",  
> "COMPETITION\_DATE": "24-NOV-2019"  
> }

The error is

> {  
> "error": {  
> "root\_cause": [  
> {  
> "type": "mapper\_parsing\_exception",  
> "reason": "failed to parse field [COMPETITION\_DATE] of type [date] in document with id '1'. Preview of field's value: '24-NOV-2019'"  
> }  
> ],  
> "type": "mapper\_parsing\_exception",  
> "reason": "failed to parse field [COMPETITION\_DATE] of type [date] in document with id '1'. Preview of field's value: '24-NOV-2019'",  
> "caused\_by": {  
> "type": "illegal\_argument\_exception",  
> "reason": "failed to parse date field [24-NOV-2019] with format [date\_optional\_time]",  
> "caused\_by": {  
> "type": "date\_time\_parse\_exception",  
> "reason": "Text '24-NOV-2019' could not be parsed at index 3"  
> }  
> }  
> },  
> "status": 400  
> }

Please advise how to insert manually a date field in the simplest format

Thanks  
Yoav

---

<div class="post-metadata">

**Author:** ![Yoav\_Ben\_Moha](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yoav_ben_moha/32/46202_2.png) [@Yoav\_Ben\_Moha](https://discuss.elastic.co/u/Yoav_Ben_Moha)\
**Post date:** [December 1, 2019, 6:55pm UTC](https://discuss.elastic.co/t/failed-to-parse-date-field-from-kibana/210067/2 "2019-12-01T18:55:55Z")

</div>

Problem solved:  
"format" : "yyyy-MM-dd"

---

<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:** [December 29, 2019, 6:56pm UTC](https://discuss.elastic.co/t/failed-to-parse-date-field-from-kibana/210067/3 "2019-12-29T18:56:03Z")

</div>

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