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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...