# Logstash date filter

**URL:** <https://discuss.elastic.co/t/logstash-date-filter/274864>\
**Category:** Logstash\
**Created:** [June 3, 2021, 11:30am UTC](https://discuss.elastic.co/t/logstash-date-filter/274864 "2021-06-03T11:30:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kamikaze\_K](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kamikaze_k/32/77246_2.png) [@Kamikaze\_K](https://discuss.elastic.co/u/Kamikaze_K)\
**Post date:** [June 3, 2021, 11:30am UTC](https://discuss.elastic.co/t/logstash-date-filter/274864/1 "2021-06-03T11:30:35Z")

</div>

I have logs that I am parsing and the date does not contain the year which should be default current year.

The field that I get after grok etc is 06/25 11:33:19.9 PM and 06/25 11:33:19.9 PM etc

I am trying to use the date filter to change these to a date field type before sending to elastic search. I am using the date filter below

```auto
date {
match => ["timestamp", "MM/dd HH:mm:ss:S a"]
    target => "timestamp"
 }

```

But I am getting a dateparsefailure. I'm i missing something?

---

<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:** [June 3, 2021, 3:49pm UTC](https://discuss.elastic.co/t/logstash-date-filter/274864/2 "2021-06-03T15:49:40Z")

</div>

That should be ".S", not ":S"

---

<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 1, 2021, 3:50pm UTC](https://discuss.elastic.co/t/logstash-date-filter/274864/3 "2021-07-01T15:50:00Z")

</div>

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