Splunk Search

Convert Time Format

SoknySplunk
Loves-to-Learn Lots

Hi ,

In splunk query i need to convert time format as below .

Current format - 08:09.23 AM, Fri 06/10/2016

Required Format : 10/06/2016 08:09:23

Tags (1)
0 Karma
1 Solution

vnravikumar
Champion

Hi

Check this and ensure 08:09:23 AM or 08:09.23 AM

[Updated]

| makeresults 
| eval temp="08:09:23 AM, Fri 06/10/2016" 
| eval result = strftime(strptime(temp,"%I:%M:%S %p, %a %m/%d/%Y"),"%d/%m/%Y %H:%M:%S")

View solution in original post

vnravikumar
Champion

Hi

Check this and ensure 08:09:23 AM or 08:09.23 AM

[Updated]

| makeresults 
| eval temp="08:09:23 AM, Fri 06/10/2016" 
| eval result = strftime(strptime(temp,"%I:%M:%S %p, %a %m/%d/%Y"),"%d/%m/%Y %H:%M:%S")
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...