# Parsing date format error

**URL:** <https://discuss.elastic.co/t/parsing-date-format-error/149446>\
**Category:** Logstash\
**Created:** [September 21, 2018, 12:14pm UTC](https://discuss.elastic.co/t/parsing-date-format-error/149446 "2018-09-21T12:14:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Khaled\_Saidi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/khaled_saidi/32/98636_2.png) [@Khaled\_Saidi](https://discuss.elastic.co/u/Khaled_Saidi)\
**Post date:** [September 21, 2018, 12:14pm UTC](https://discuss.elastic.co/t/parsing-date-format-error/149446/1 "2018-09-21T12:14:03Z")

</div>

Hi everybody,

I'm facing an issue that drive me crazy.  
I have a date field in my log file like :

2018-09-21T14:01:59.271245+02:00

In my logstash filter i tried a lot of pattern and the last one is:

```
date {
      match => ["datetime", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd'T'HH:mm:ss.SSSSSSZZ", "ISO8601"]
}  

```

But it does not work....

Does anyone have any ideas please ?

Thx for your help.

---

<div class="post-metadata">

**Author:** ![Khaled\_Saidi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/khaled_saidi/32/98636_2.png) [@Khaled\_Saidi](https://discuss.elastic.co/u/Khaled_Saidi)\
**Post date:** [September 24, 2018, 3:08pm UTC](https://discuss.elastic.co/t/parsing-date-format-error/149446/2 "2018-09-24T15:08:27Z")

</div>

Hi,

No answer yet...  
Nobody have to deal with this kind of format ?

---

<div class="post-metadata">

**Author:** ![guyboertje](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/guyboertje/32/31592_2.png) [@guyboertje](https://discuss.elastic.co/u/guyboertje)\
**Post date:** [September 26, 2018, 12:48pm UTC](https://discuss.elastic.co/t/parsing-date-format-error/149446/3 "2018-09-26T12:48:36Z")

</div>

It works for me:

```auto
input {
  generator {
    lines => ['2018-09-21T14:01:59.271245+02:00']
    count => 1
  }
}

filter {
  date {
    match => ["message", "yyyy-MM-dd'T'HH:mm:ss.SSSSSSZ"]
  }
}

output {
  stdout { codec => rubydebug }
}

```

Result:

```auto
{
      "sequence" => 0,
          "host" => "Elastics-MacBook-Pro.local",
      "@version" => "1",
    "@timestamp" => 2018-09-21T12:01:59.271Z,
       "message" => "2018-09-21T14:01:59.271245+02:00"
}

```

---

<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:** [October 24, 2018, 12:48pm UTC](https://discuss.elastic.co/t/parsing-date-format-error/149446/4 "2018-10-24T12:48:40Z")

</div>

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