Splunk Search

Date and Time format for not an epoch format

srinivas_gowda
Path Finder

Hello all,

 

I have been getting the data and time format in the below way. How do I convert it to the given readable format

 

20210901225446 -> 2021-09-01 22:54:46

20210901224509 -> 2021-09-01 22:45:09

 

Thank you.

Labels (4)
0 Karma
1 Solution

isoutamo
SplunkTrust
SplunkTrust

Hi

there is couple of ways to do it. Here is one

| makeresults
| eval time = "20210901225446"
| eval nTime = strftime(strptime(time,"%Y%m%d%H%M%S"), "%F %T")
| table time nTime

r. Ismo 

View solution in original post

isoutamo
SplunkTrust
SplunkTrust

Hi

there is couple of ways to do it. Here is one

| makeresults
| eval time = "20210901225446"
| eval nTime = strftime(strptime(time,"%Y%m%d%H%M%S"), "%F %T")
| table time nTime

r. Ismo 

Get Updates on the Splunk Community!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...