Splunk Search

Sort not working when change the time format

Pajkow
Engager

Hi all, got the problem with sort,

When I change the time format from default e.g. 2020-05-08 19:46:20 to this :08/05/20 19:46:20 by the use  this conversion command:  | eval _time=strftime(_time,"%d/%m/%y %H:%M:%S") the sort function does not work.

To overcome this, I can put the sort command e.g.  "  | sort -_time " prior eval command but this does not resolve the main Splunk build in feature .i. e. arrows up and down next to the table headers. 

Since I changed the time output format the sort will work only on one page with results, if there are multiple pages with results, this will not work, is this normal?

0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust

You possibly don't want to change _time itself, but you can change the way it is displayed e.g. fieldformat _time=strftime(_time,"%d/%m/%y %H:%M:%S")

View solution in original post

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

You possibly don't want to change _time itself, but you can change the way it is displayed e.g. fieldformat _time=strftime(_time,"%d/%m/%y %H:%M:%S")

0 Karma
Get Updates on the Splunk Community!

AI for AppInspect

We’re excited to announce two new updates to AppInspect designed to save you time and make the app approval ...

App Platform's 2025 Year in Review: A Year of Innovation, Growth, and Community

As we step into 2026, it’s the perfect moment to reflect on what an extraordinary year 2025 was for the Splunk ...

Operationalizing Entity Risk Score with Enterprise Security 8.3+

Overview Enterprise Security 8.3 introduces a powerful new feature called “Entity Risk Scoring” (ERS) for ...