# Mismatch in custom date throws \_\_dateparsefailure logstash

**URL:** <https://discuss.elastic.co/t/mismatch-in-custom-date-throws---dateparsefailure-logstash/81733>\
**Category:** Logstash\
**Created:** [April 10, 2017, 2:01am UTC](https://discuss.elastic.co/t/mismatch-in-custom-date-throws---dateparsefailure-logstash/81733 "2017-04-10T02:01:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ankitc7](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@ankitc7](https://discuss.elastic.co/u/ankitc7)\
**Post date:** [April 10, 2017, 2:01am UTC](https://discuss.elastic.co/t/mismatch-in-custom-date-throws---dateparsefailure-logstash/81733/1 "2017-04-10T02:01:21Z")

</div>

The input is comma separated values: "2010-08-19","09:12:55","56095675"

I created the custom date\_time field which appears to right format 2010-08-19;09:12:55 but not matching.

```
filter {
 grok {
    match => { "message" => '"(%{GREEDYDATA:cust_date})","(%{TIME:cust_time})","(%{NUMBER:author})"'}
    add_field => {
            "date_time" => "%{cust_date};%{cust_time}"
    }
}

date {
  match => ["date_time", "yyyy-MM-dd;hh:mm:ss"]
  target => "@timestamp"
  add_field => { "debug" => "timestampMatched"}
}

```

Output on Kibana:

```
cust_date August 18th 2010, 20:00:00.000
cust_time 09:12:55
date_time 2010-08-19;09:12:55
message "2010-08-19","09:12:55","56095675"
tags beats_input_codec_plain_applied, _dateparsefailure

```

It gives `_dateparsefailure`. The fields appear to be same as match pattern. I tried different time format like `YYYY-MM-dd;hh:mm:ss` and `YYYY-MM-dd;HH:mm:ss`

What am I doing wrong? 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:** [May 8, 2017, 2:04am UTC](https://discuss.elastic.co/t/mismatch-in-custom-date-throws---dateparsefailure-logstash/81733/2 "2017-05-08T02:04:42Z")

</div>

Closed on May 8, 2017, 2:04am UTC

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