Splunk Enterprise

parsing time

VijaySrrie
Builder

Hi,

How to parse below

2020.08.20 07:38:42 902 +1000

0 Karma
1 Solution

isoutamo
SplunkTrust
SplunkTrust

Hi

Here is example what you can do with it

 

| makeresults
| eval Time1="2020.08.20 07:38:42 902 +1000"
| eval epoch_time = strptime(Time1, "%Y.%m.%d %H:%M:%S %3Q %z")
| eval Time_Human = strftime(epoch_time, "%c")
| eval Time_2 = strftime(epoch_time,"%FT%T.%3Q%:z")

 

More information about time formats:

https://docs.splunk.com/Documentation/Splunk/8.0.5/SearchReference/Commontimeformatvariables

r. Ismo 

View solution in original post

0 Karma

isoutamo
SplunkTrust
SplunkTrust

Hi

Here is example what you can do with it

 

| makeresults
| eval Time1="2020.08.20 07:38:42 902 +1000"
| eval epoch_time = strptime(Time1, "%Y.%m.%d %H:%M:%S %3Q %z")
| eval Time_Human = strftime(epoch_time, "%c")
| eval Time_2 = strftime(epoch_time,"%FT%T.%3Q%:z")

 

More information about time formats:

https://docs.splunk.com/Documentation/Splunk/8.0.5/SearchReference/Commontimeformatvariables

r. Ismo 

0 Karma

harsmarvania57
Ultra Champion

Please provide more information, where you want to parse that timestamp ?

0 Karma
Get Updates on the Splunk Community!

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...