Splunk Search

Does Splunk have the ability to sort by month-year?

nick405060
Motivator

I have data that looks like Jan-19 and I want to sort by it. Except I can't, because strptime("Jan-19","%b-%y") does not work, even though e.g. strptime("Jan-1-19","%b-%d-%y") does.

How do I workaround this (presumably extremely common but not documented or fixed) bug?

0 Karma

nick405060
Motivator

I posted this for the community so it could be documented. The best workaround I've seen was presented by @chrisyoungerjds:

strptime("1-" + "Jan-19","%d-%b-%y")

Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

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

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...