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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...