# Grokparsefailure on parsing date time field

**URL:** <https://discuss.elastic.co/t/grokparsefailure-on-parsing-date-time-field/75488>\
**Category:** Logstash\
**Created:** [February 17, 2017, 12:26pm UTC](https://discuss.elastic.co/t/grokparsefailure-on-parsing-date-time-field/75488 "2017-02-17T12:26:22Z")\
**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:** [February 17, 2017, 12:26pm UTC](https://discuss.elastic.co/t/grokparsefailure-on-parsing-date-time-field/75488/1 "2017-02-17T12:26:22Z")

</div>

I have a timefield like;

```
[08/Feb/2017:07:09:47 +0000]

```

and I use the pattern in grok match like;

```
\[(?<date_and_time>%{MONTHDAY}/%{MONTH}/20%{YEAR}:%{HOUR}:?%{MINUTE}(?::?%{SECOND}) ZZZ)\]

```

which is giving me a grokparsefailure. Somebody kindly help me to fix this?  
Thank you.

---

<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:** [February 20, 2017, 7:39pm UTC](https://discuss.elastic.co/t/grokparsefailure-on-parsing-date-time-field/75488/2 "2017-02-20T19:39:10Z")

</div>

"ZZZ" belongs in a date filter, not a grok filter. Replace it with a grok pattern that matches timezone offsets.

---

<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:** [March 20, 2017, 7:39pm UTC](https://discuss.elastic.co/t/grokparsefailure-on-parsing-date-time-field/75488/3 "2017-03-20T19:39:15Z")

</div>

Closed on March 20, 2017, 7:39pm UTC

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