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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...