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!

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Introducing the Splunk Community Dashboard Challenge!

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

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...