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!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...