Logstash not formatting date to yyyyMMdd

Here is the snippet, the date in load file comes as string as 2020-02-06-, we need to load it to elastic in format yyyyMMdd. But the below code only converts String to date and not the format.

filter {

	date {
		match => ["OPEN_DATE","yyyyMMdd"]
		target => "OPEN_DATE"		

The format in a date filter has to match the format of the date. Something like yyyy-MM-dd-HH-mm-ss-SSSSSS

You can then use a ruby filter and strftime to create a string in a different format.

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