Hi all
For a field in CSV "Time Closed" the value is '29/03/2018 09:29'
I need to crop the value just to '29/03/2018' ignoring the time
so how can i do this using the Date plugin
thanks in advance
Hi all
For a field in CSV "Time Closed" the value is '29/03/2018 09:29'
I need to crop the value just to '29/03/2018' ignoring the time
so how can i do this using the Date plugin
thanks in advance
I would do this using a mutate filter.
mutate { gsub => [ "somefield", "^([^ ]+) .*", "\1" ] }
thank you, but can you please elaborate on this
The regexp has two parts. The first is '^([^ ]+)', which matches the beginning of the line followed by multiple characters that are not space. This is wrapped in (), which causes the regexp processor to capture whatever the pattern matches (which is 29/03/2018). That's followed by ' .*' which is a single space followed by the rest of the line. The replacement string is '\1', which is a reference to the first capture group.
many thanks, will explore for more thanks again
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
© 2020. All Rights Reserved - Elasticsearch
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant logo are trademarks of the Apache Software Foundation in the United States and/or other countries.