# Date Parse Failure for dd-MMM-yy h:mm:ss a z

**URL:** <https://discuss.elastic.co/t/date-parse-failure-for-dd-mmm-yy-h-mm-ss-a-z/55526>\
**Category:** Logstash\
**Created:** [July 14, 2016, 1:11pm UTC](https://discuss.elastic.co/t/date-parse-failure-for-dd-mmm-yy-h-mm-ss-a-z/55526 "2016-07-14T13:11:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sallehuddin](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@sallehuddin](https://discuss.elastic.co/u/sallehuddin)\
**Post date:** [July 14, 2016, 1:11pm UTC](https://discuss.elastic.co/t/date-parse-failure-for-dd-mmm-yy-h-mm-ss-a-z/55526/1 "2016-07-14T13:11:11Z")

</div>

I've been scratching my head for hours trying to figure out why the following datetime format failed to be properly detected by date filter of logstash.

I have the following sample data from csv file:  
09-Jul-16 10:00:00 PM SGT,64.2  
09-Jul-16 10:15:00 PM SGT,64.3  
09-Jul-16 10:30:00 PM SGT,63.9

I've used the following filter to separate the two column and after that try to use the first column to set the @timestamp:

```
csv {
      columns => ["datadate", "rh"]
      separator => ","
    }

date {
      match => ["datadate", "dd-MMM-yy h:mm:ss a z"]
}

```

however, the date filter failed to match with \_dateparsefailure in the indexed data. Can anybody point to me where did I make the mistakes?

Thanks.

---

<div class="post-metadata">

**Author:** ![fbaligand](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fbaligand/32/5657_2.png) [@fbaligand](https://discuss.elastic.co/u/fbaligand)\
**Post date:** [July 14, 2016, 2:25pm UTC](https://discuss.elastic.co/t/date-parse-failure-for-dd-mmm-yy-h-mm-ss-a-z/55526/2 "2016-07-14T14:25:50Z")

</div>

Hi,

The problem is the timezone part. All the rest is OK.

2 things to fix your problem :

- replace 'z' by 'ZZZ' in your match pattern
- SGT is unfortunately not recognized by joda time library. So I invite you to replace 'SGT' word by 'Singapore'. You can do that using mutate filter.

---

<div class="post-metadata">

**Author:** ![sallehuddin](https://avatars.discourse-cdn.com/v4/letter/s/4da419/32.png) [@sallehuddin](https://discuss.elastic.co/u/sallehuddin)\
**Post date:** [July 15, 2016, 2:26am UTC](https://discuss.elastic.co/t/date-parse-failure-for-dd-mmm-yy-h-mm-ss-a-z/55526/3 "2016-07-15T02:26:43Z")

</div>

Thank you Fabien. I'll see how I can do a workaround using your suggestion then.

I should have checked this document earlier to save time 😃

[http://joda-time.sourceforge.net/timezones.html](http://joda-time.sourceforge.net/timezones.html)

---

<div class="post-metadata">

**Author:** ![fbaligand](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fbaligand/32/5657_2.png) [@fbaligand](https://discuss.elastic.co/u/fbaligand)\
**Post date:** [July 15, 2016, 6:19am UTC](https://discuss.elastic.co/t/date-parse-failure-for-dd-mmm-yy-h-mm-ss-a-z/55526/4 "2016-07-15T06:19:00Z")

</div>

You're welcome:)

---

<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:** [July 6, 2017, 4:47am UTC](https://discuss.elastic.co/t/date-parse-failure-for-dd-mmm-yy-h-mm-ss-a-z/55526/5 "2017-07-06T04:47:54Z")

</div>


