0
votes

Splunk convert Wed Sep 23 08:00:00 PDT 2020 to _time and epoch time in splunk . What is the splunk query to convert java date format to yyyy-MM-dd

2

2 Answers

0
votes

To convert time strings from one format to another you must strptime() convert to epoch form and then use strftime() to convert to the desired result format.

... | eval newTS=strftime(strptime("Wed Sep 23 08:00:00 PDT 2020", "%a %b %d %H:%M:%:S %Z %Y"), "%Y-%m-%d")