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!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...