# Could not index event to Elasticsearch. Logstash date filter

**URL:** https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-logstash-date-filter/218600
**Category:** Logstash
**Created:** [February 10, 2020, 1:55pm UTC](https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-logstash-date-filter/218600 "2020-02-10T13:55:47Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![MPiorunn](https://avatars.discourse-cdn.com/v4/letter/m/a88e4f/32.png) [@MPiorunn](https://discuss.elastic.co/u/MPiorunn)
#### Post date: [February 10, 2020, 1:55pm UTC](https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-logstash-date-filter/218600/1 "2020-02-10T13:55:47Z")

</div>

Hello,

I am constantly getting \_dateparsefailure tag in Logstash output and because I am not using Time Filter in Index Patterns, I am getting an error : **Could not index event to Elasticsearch. Preview of field's value: '2020-02-10 13:38:05.034'","reason"=\>"failed to parse date field [2020-02-10 13:38:05.034] with format [strict\_date\_optional\_time||epoch\_millis]"**

My date filter in logstash seems ok :

```
date {
    match => ["log_date", "yyyy-MM-dd hh:mm:ss.SSS"]
    target => "log_date"
    timezone => ['Europe/Warsaw']
 }

```

For this specific value, with this date filter Logstash is throwing exceptions and my data is not properly indexed in ElasticSearch  
I need help with this problem, because date filter looks ok, and it's still not working.

---

<div class="post-metadata">

### Author: ![Fabio-sama](https://avatars.discourse-cdn.com/v4/letter/f/b9e5f3/32.png) [@Fabio-sama](https://discuss.elastic.co/u/Fabio-sama)
#### Post date: [February 10, 2020, 2:25pm UTC](https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-logstash-date-filter/218600/2 "2020-02-10T14:25:05Z")

</div>

Hi there,

what about

```
date {
  match => ["log_date", "YYYY-MM-dd HH:mm:ss.SSS"]
  target => "log_date"
  timezone => ['Europe/Warsaw']
}
```

---

<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: [February 10, 2020, 3:20pm UTC](https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-logstash-date-filter/218600/3 "2020-02-10T15:20:38Z")

</div>

hh is the hour of the half day, so it can be from 1 to 12. 13 is not valid. Use HH instead.

---

<div class="post-metadata">

### Author: ![MPiorunn](https://avatars.discourse-cdn.com/v4/letter/m/a88e4f/32.png) [@MPiorunn](https://discuss.elastic.co/u/MPiorunn)
#### Post date: [February 11, 2020, 7:23am UTC](https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-logstash-date-filter/218600/4 "2020-02-11T07:23:22Z")

</div>

Thank you very much 🙂 That explains why is wasn't working after 12:00

---

<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 10, 2020, 7:23am UTC](https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-logstash-date-filter/218600/5 "2020-03-10T07:23:30Z")

</div>

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