Logstash Date Filter Plugin: Field remains a string datatype

Hi,

I'm trying to import a CSV-file that contains a date field, into Elasticsearch.
The date field contains dates that look like this:
5-3-2018 08:51:00
So the format is: dd-MM-YYYY HH:mm:ss (If I'm correct)

I've inserted the filter in a config like this:

date {
match => ["date", "dd-MM-YYYY HH:mm:ss"]
target => "another_field"
}

The config itself works fine, but the date-field remains a string datatype.
I'm not entirely sure if I'm understanding the Date Filter plugin correctly...

Any help would be very much appreciated!

That is expected. You have configured it to put the parsed date into another_field. If you want it to modify date then you can set that as the target.

Hi Badger,

Thanks a lot; your answer worked for me!
On a side note, I noticed that the imported records had a 'tag' containing 'dateparsefailure'.
That was a result of a mismatch in the columns in the CSV-file and the columns I added in the config, my bad. So, for others experiencing similar issues: double check the columns.

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