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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...