Splunk Search

Help me to Format date

rockts89
Engager

Hi

I want to format the date field with the following format

Ex:

20190401

Expected:

01 Apr 2019 Mon

Thanks

Tags (2)
0 Karma
1 Solution

vnravikumar
Champion

Hi

Try like

| makeresults 
| eval date ="20190401" 
| eval epoch =strptime(date,"%Y%m%d") 
| eval new_date=strftime(epoch,"%d %b %Y  %a")

View solution in original post

vnravikumar
Champion

Hi

Try like

| makeresults 
| eval date ="20190401" 
| eval epoch =strptime(date,"%Y%m%d") 
| eval new_date=strftime(epoch,"%d %b %Y  %a")

rockts89
Engager

Thanks for quick reply..

0 Karma
Get Updates on the Splunk Community!

Modernize your Splunk Apps – Introducing Python 3.13 in Splunk

We are excited to announce that the upcoming releases of Splunk Enterprise 10.2.x and Splunk Cloud Platform ...

New Release | Splunk Cloud Platform 10.1.2507

Hello Splunk Community!We are thrilled to announce the General Availability of Splunk Cloud Platform 10.1.2507 ...

🌟 From Audit Chaos to Clarity: Welcoming Audit Trail v2

🗣 You Spoke, We Listened  Audit Trail v2 wasn’t written in isolation—it was shaped by your voices.  In ...