# Date filter, match, target and index name

**URL:** <https://discuss.elastic.co/t/date-filter-match-target-and-index-name/184400>\
**Category:** Logstash\
**Created:** [June 5, 2019, 2:59pm UTC](https://discuss.elastic.co/t/date-filter-match-target-and-index-name/184400 "2019-06-05T14:59:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![arikfre](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@arikfre](https://discuss.elastic.co/u/arikfre)\
**Post date:** [June 5, 2019, 2:59pm UTC](https://discuss.elastic.co/t/date-filter-match-target-and-index-name/184400/1 "2019-06-05T14:59:46Z")

</div>

Hi,  
I have jdbc input that selects from MySQL. One of the fields is called report\_date from type datetime.

filter {  
date {  
match =\> ["report\_date", "yyyy-MM-dd HH:mm:ss"]  
target =\> "report\_date"  
}  
}

output {  
elasticsearch {  
hosts =\> ["[http://localhost:9200](http://localhost:9200)"]  
index =\> "digest\_%{+YYYY.MM.dd}"  
}  
}

Still, in ES the date in the index is taken from @timestamp  
and I also see "tags" : ["\_dateparsefailure"]

I read similar topics, but didn't find the reason. Any ideas?

---

<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 5, 2019, 3:53pm UTC](https://discuss.elastic.co/t/date-filter-match-target-and-index-name/184400/2 "2019-06-05T15:53:44Z")

</div>

[This](https://github.com/logstash-plugins/logstash-filter-date/issues/95)?

---

<div class="post-metadata">

**Author:** ![arikfre](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@arikfre](https://discuss.elastic.co/u/arikfre)\
**Post date:** [June 5, 2019, 5:07pm UTC](https://discuss.elastic.co/t/date-filter-match-target-and-index-name/184400/3 "2019-06-05T17:07:41Z")

</div>

PERFECT.  
Thank you so much Badger.

---

<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 3, 2019, 5:07pm UTC](https://discuss.elastic.co/t/date-filter-match-target-and-index-name/184400/4 "2019-07-03T17:07:43Z")

</div>

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