Not able to parse Custom Date


(Ajit Singh) #1

I have a date in the format 06/30/2016 00:21:49, I am trying to parse this date using

date {
  match => [ "time", "MM/dd/YYYY HH:mm:ss" ]
}

But the date is still a string value.
So how can I parse a date if it is not there in prewritten date pattern ??


(Ed) #2

Yes it will be as the date command is not changing your field By default it updates the @TIMESTAMP field

https://www.elastic.co/guide/en/logstash/current/plugins-filters-date.html#plugins-filters-date-target


(Ajit Singh) #3

Yeah ! What you said was right. I added target => "date-time" (date-time is my custom date field) and now it is working as expected.


(system) #4

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