Convert date from string to datetime format

Hi there,

I have logstash filter with date as below:

date {
match => ["date","MMM dd yyyy HH:mm:ss", "MMM d yyyy HH:mm:ss"]
target => "date"
}

but when i visualize data on kibana, i got "date" field which still got a type is string.


So i want to convert "date" field from string to date. How can someone help me?
Thanks.

The date field has already been mapped as string by ES and there's nothing Logstash can do about that. If possible just delete the existing index.

If i delete existing index, my data will be released, date field also.
You mean there is no way to convert date from string to date when visualize in kibana?

You can reindex your data, but then you have to make sure to deal with the existing documents whose date field isn't recognized as a timestamp by ES. If you just reindex chances are that the date field in the first document that's reindexed will be recognized as a string and then your back at square one.

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