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 ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...