Getting Data In

Time formatting from a single field

muralianup
Communicator

I have a field where time format in: 20020523135537Z which is 05/23/2002 13:53:37 GMT . How can I convert to human readable form in the results ?

0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Here's one way.

... | eval timestr = strftime(strptime(field, "%Y%m%d%H%M%S%Z"), "%m/%d/%Y %H:%M:%S %Z") | ...
---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

Here's one way.

... | eval timestr = strftime(strptime(field, "%Y%m%d%H%M%S%Z"), "%m/%d/%Y %H:%M:%S %Z") | ...
---
If this reply helps you, Karma would be appreciated.

muralianup
Communicator

Thank you. Works perfect.

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