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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

Splunk is officially part of Cisco

Revolutionizing how our customers build resilience across their entire digital footprint.   Splunk ...

Splunk APM & RUM | Planned Maintenance March 26 - March 28, 2024

There will be planned maintenance for Splunk APM and RUM between March 26, 2024 and March 28, 2024 as ...