Splunk Search

convert the date in required format

ncbshiva
Communicator

Hai i have a field which has dates

example : 1-Oct-13
4-Dec-13
28-Oct-13

I have to convert to below format

01-Oct-13
04-Oct-13 and so on....

Please help me

Thanking you in advance

Tags (1)
0 Karma
1 Solution

somesoni2
Revered Legend

Try this. Assuming your field name is date.

your base search | eval date=strptime(date,"%e-%b-%y") | eval date=strftime(date,"%d-%b-%y")

View solution in original post

somesoni2
Revered Legend

Try this. Assuming your field name is date.

your base search | eval date=strptime(date,"%e-%b-%y") | eval date=strftime(date,"%d-%b-%y")
Get Updates on the Splunk Community!

Modern way of developing distributed application using OTel

Recently, I had the opportunity to work on a complex microservice using Spring boot and Quarkus to develop a ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had 3 releases of new security content via the Enterprise Security ...

Archived Metrics Now Available for APAC and EMEA realms

We’re excited to announce the launch of Archived Metrics in Splunk Infrastructure Monitoring for our customers ...