# Problem with Logstash date parse

**URL:** <https://discuss.elastic.co/t/problem-with-logstash-date-parse/193311>\
**Category:** Logstash\
**Created:** [August 1, 2019, 11:25am UTC](https://discuss.elastic.co/t/problem-with-logstash-date-parse/193311 "2019-08-01T11:25:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shagun](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shagun/32/59565_2.png) [@shagun](https://discuss.elastic.co/u/shagun)\
**Post date:** [August 1, 2019, 11:25am UTC](https://discuss.elastic.co/t/problem-with-logstash-date-parse/193311/1 "2019-08-01T11:25:13Z")

</div>

I have a date in this format

`"event_time" : "2019-07-02 19:23:59+0000"`

and need to parse it in the format of **@timestamp** that is

`"@timestamp" : "2019-08-01T11:18:34.890Z"`

This is my filter :

```
date {
match => ["event_time", "yyyy-MM-dd'T'HH:mm:ss'.'SSS'Z'"]
locale => en
timezone => "UTC"
target => "event_time"
}

```

but unable to parse.  
Help me with suggestions.

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [August 1, 2019, 12:20pm UTC](https://discuss.elastic.co/t/problem-with-logstash-date-parse/193311/2 "2019-08-01T12:20:27Z")

</div>

> [@shagun](#):
>
> yyyy-MM-dd'T'HH:mm:ss'.'SSS'Z'

That does not match your field format. Try

```
date { match => ["event_time", "yyyy-MM-dd HH:mm:ssZ'"] }

```

---

<div class="post-metadata">

**Author:** ![shagun](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shagun/32/59565_2.png) [@shagun](https://discuss.elastic.co/u/shagun)\
**Post date:** [August 2, 2019, 11:29am UTC](https://discuss.elastic.co/t/problem-with-logstash-date-parse/193311/3 "2019-08-02T11:29:36Z")

</div>

Oh Okay! I got it what to match here in "match" field. I was assuming it wrong.  
Thanks 🙂

---

<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:** [August 30, 2019, 11:33am UTC](https://discuss.elastic.co/t/problem-with-logstash-date-parse/193311/4 "2019-08-30T11:33:21Z")

</div>

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