# Logstash, Date plugin not working as expected

**URL:** <https://discuss.elastic.co/t/logstash-date-plugin-not-working-as-expected/262525>\
**Category:** Logstash\
**Created:** [January 28, 2021, 3:12pm UTC](https://discuss.elastic.co/t/logstash-date-plugin-not-working-as-expected/262525 "2021-01-28T15:12:17Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [January 28, 2021, 5:14pm UTC](https://discuss.elastic.co/t/logstash-date-plugin-not-working-as-expected/262525/4 "2021-01-28T17:14:48Z")

</div>

I think the problem is in the underlying Joda library that the date filter uses. When it sees H the builder [looks for](https://github.com/JodaOrg/joda-time/blob/890fb7b8801f7a8132464a8d558f410373918f96/src/main/java/org/joda/time/format/DateTimeFormatterBuilder.java#L726) one or two digits -- it is not limited to one. That will consume '94', which is not a valid hour.

You could use mutate+gsub to change the timestamp to "20210128 9.4501065" and then parse that using "yyyyMMdd H.mmssSSS"

---

_[View the full topic](https://discuss.elastic.co/t/logstash-date-plugin-not-working-as-expected/262525)._
