# Mapper\_parsing\_exception for to\_char date field

**URL:** <https://discuss.elastic.co/t/mapper-parsing-exception-for-to-char-date-field/72629>\
**Category:** Logstash\
**Created:** [January 24, 2017, 12:32pm UTC](https://discuss.elastic.co/t/mapper-parsing-exception-for-to-char-date-field/72629 "2017-01-24T12:32:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![elasticheart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/elasticheart/32/65189_2.png) [@elasticheart](https://discuss.elastic.co/u/elasticheart)\
**Post date:** [January 24, 2017, 12:32pm UTC](https://discuss.elastic.co/t/mapper-parsing-exception-for-to-char-date-field/72629/1 "2017-01-24T12:32:37Z")

</div>

Hi,

I am fetching data from db and I convert one of the date fields in my db to char like

```
TO_CHAR(processtime, 'DD-MM-YYYY hh:mm:ss.MIFF1 AM') as process_time

```

returns date like;

```
03-01-2017 03:01:50.320 PM

```

When I run Logstash, i am getting an error like;

```
[2017-01-24T18:28:02,044][WARN][logstash.outputs.elasticsearch] Failed action. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"mylogs-2017-01-24", :_type=>"logs", :_routing=>nil}, 2017-01-24T12:58:01.893Z %{host} %{message}], :response=>{"index"=>{"_index"=>"mylogs-2017-01-24", "_type"=>"logs", "_id"=>"AVnQjfdV2fWIWeetSa-3", "status"=>400, "error"=>{"type"=>"mapper_parsing_exception", "reason"=>"failed to parse [process_time]", "caused_by"=>{"type"=>"illegal_argument_exception", "reason"=>"Invalid format: \"02-01-2017 12:01:30\" is malformed at \"-01-2017 12:01:30\""}}}}}

```

Why is this happening? How can I fix this?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [January 26, 2017, 6:52am UTC](https://discuss.elastic.co/t/mapper-parsing-exception-for-to-char-date-field/72629/2 "2017-01-26T06:52:20Z")

</div>

What's the current ES mapping of the `process_time` field?

---

<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:** [February 23, 2017, 6:52am UTC](https://discuss.elastic.co/t/mapper-parsing-exception-for-to-char-date-field/72629/3 "2017-02-23T06:52:51Z")

</div>

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