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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...