# Date filter dateparsefailure

**URL:** <https://discuss.elastic.co/t/date-filter-dateparsefailure/214668>\
**Category:** Logstash\
**Created:** [January 10, 2020, 9:06pm UTC](https://discuss.elastic.co/t/date-filter-dateparsefailure/214668 "2020-01-10T21:06:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DevOP](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/devop/32/50610_2.png) [@DevOP](https://discuss.elastic.co/u/DevOP)\
**Post date:** [January 10, 2020, 9:06pm UTC](https://discuss.elastic.co/t/date-filter-dateparsefailure/214668/1 "2020-01-10T21:06:43Z")

</div>

Hello...  
I've been experimenting with logstash capabilities lately, and no matter which direction I take with the date filter, I seem to end up with \_dateparsefailure. So to save myself the frustration, I was wondering if anyone could identify what is wrong, second set of eyes 🙂 .

I am reading from dated logs. therefore my goal was to set @timestamp to the time within the log as opposed to the log insertion time.

Here is a sample date i'm working with: "2020-01-01 18:12:09.746046"  
This date is set to a field named "Logdate" using grok before the date filter is called in the config.

and here is the snippet of my config:

> date {  
> locale =\> "en"  
> match =\> ["Logdate", "yyyy-MM-dd HH:mm:ss.SSS"]  
> target =\> "@timestamp"  
> }

Any input would be appreciated!

---

<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 10, 2020, 9:21pm UTC](https://discuss.elastic.co/t/date-filter-dateparsefailure/214668/2 "2020-01-10T21:21:30Z")

</div>

You have to match the entire field, so if you have six digits of precision use

```
match => ["Logdate", "yyyy-MM-dd HH:mm:ss.SSSSSS"]
```

---

<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:** [February 7, 2020, 9:42pm UTC](https://discuss.elastic.co/t/date-filter-dateparsefailure/214668/4 "2020-02-07T21:42:55Z")

</div>

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