Splunk Enterprise

How to convert time format to readable time format?

Srubhi
Path Finder

We have data fields in the format, for example, 12Jun22 I need to format like 12-06-2022 
as shown in the below table:

date expected format
12Jun22 12-06-20222
13Jun22 13-06-2022
Labels (1)
Tags (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Splunk has the strptime and strftime functions for that purpose.

| eval date=strftime(strptime(date, "%d%b%y"), "%d-%m-%Y")
---
If this reply helps you, Karma would be appreciated.

View solution in original post

Srubhi
Path Finder

Thanks @richgalloway it worked!

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Splunk has the strptime and strftime functions for that purpose.

| eval date=strftime(strptime(date, "%d%b%y"), "%d-%m-%Y")
---
If this reply helps you, Karma would be appreciated.
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 ...