# Logstash date filter parsing date

**URL:** <https://discuss.elastic.co/t/logstash-date-filter-parsing-date/187176>\
**Category:** Logstash\
**Created:** [June 24, 2019, 5:10pm UTC](https://discuss.elastic.co/t/logstash-date-filter-parsing-date/187176 "2019-06-24T17:10:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cbeprem](https://avatars.discourse-cdn.com/v4/letter/c/51bf81/32.png) [@cbeprem](https://discuss.elastic.co/u/cbeprem)\
**Post date:** [June 24, 2019, 5:10pm UTC](https://discuss.elastic.co/t/logstash-date-filter-parsing-date/187176/1 "2019-06-24T17:10:09Z")

</div>

I am using the date filter but it is not working . Kindly help me out.

Below is the config file. I am using a csv in s3 to ingest data via logstash. I am using ELK 7

filter {  
csv {  
separator =\> ","  
columns =\> ["Date", "Source\_Name", "Store\_Name", "Zip\_Code", "Category", "Subcategory", "PRODUCT\_TYPE", "Stock\_Status", "Additional\_Text\_1", "Additional\_Text\_2", "UOM", "Size", "Size", "Reg\_Price\_Alt", "UOM\_Alt", "Size\_Alt"]  
}

```
 date {
    match => ["Date", "dd/MM/yyyy HH:mm"]
    target => "Date"
 }

```

the csv date format is "25/05/2019 00:05" . But still below is the mappings seen on kibana

"Date": {  
"type": "text",  
"fields": {  
"keyword": {  
"type": "keyword",  
"ignore\_above": 256  
}  
}  
},

this is kibana output on discover

t Date 2019-06-21T03:00:00.000Z

Regards,  
Prem.

---

<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 24, 2019, 5:50pm UTC](https://discuss.elastic.co/t/logstash-date-filter-parsing-date/187176/2 "2019-06-24T17:50:00Z")

</div>

> [@cbeprem](#):
>
> this is kibana output on discover
> 
> t Date 2019-06-21T03:00:00.000Z

What issue do you have with that? It looks like the date filter parsed it and it got mapped to text as requested by the mapping.

---

<div class="post-metadata">

**Author:** ![cbeprem](https://avatars.discourse-cdn.com/v4/letter/c/51bf81/32.png) [@cbeprem](https://discuss.elastic.co/u/cbeprem)\
**Post date:** [June 27, 2019, 5:49pm UTC](https://discuss.elastic.co/t/logstash-date-filter-parsing-date/187176/3 "2019-06-27T17:49:18Z")

</div>

Thanks for the reply . It should be date instead of text in the type column .

---

<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 27, 2019, 6:06pm UTC](https://discuss.elastic.co/t/logstash-date-filter-parsing-date/187176/4 "2019-06-27T18:06:23Z")

</div>

OK, so [create a mapping](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping.html#_example_mapping) for the index that tells it that. I believe it will have to be a new index.

---

<div class="post-metadata">

**Author:** ![cbeprem](https://avatars.discourse-cdn.com/v4/letter/c/51bf81/32.png) [@cbeprem](https://discuss.elastic.co/u/cbeprem)\
**Post date:** [July 2, 2019, 3:35am UTC](https://discuss.elastic.co/t/logstash-date-filter-parsing-date/187176/5 "2019-07-02T03:35:06Z")

</div>

Thanks, I have created a template with all the mappings. That fixed my issue. Thanks.

---

<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 30, 2019, 3:35am UTC](https://discuss.elastic.co/t/logstash-date-filter-parsing-date/187176/6 "2019-07-30T03:35:06Z")

</div>

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