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!

Observability Unlocked: Kubernetes Monitoring with Splunk Observability Cloud

 Ready to master Kubernetes and cloud monitoring like the pros? Join Splunk’s Growth Engineering team for an ...

Update Your SOAR Apps for Python 3.13: What Community Developers Need to Know

To Community SOAR App Developers - we're reaching out with an important update regarding Python 3.9's ...

October Community Champions: A Shoutout to Our Contributors!

As October comes to a close, we want to take a moment to celebrate the people who make the Splunk Community ...