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!

.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 ...