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!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...