Splunk Search

How to modify my search to truncate time displayed on chart?

AKG1_old1
Builder

Hi,

I am tracking Splunk startup and stop through graph.

My search:

index=_audit action=splunkShuttingDown OR action=splunkStarting | timechart span=1s count by action

the time displayed in graph is bit long.
Currently displayed : 2017-02-22T00:00:08.000+01:00

I want it to truncate the part after minutes/seconds. some thing like this.
2017-02-22 00:00 or
2017-02-22 00:00:08

Thanks
Ankit

0 Karma
1 Solution

AKG1_old1
Builder

Solved by eval function

eval _time=strftime(_time, "%y-%m-%d %I:%M:%S")

View solution in original post

AKG1_old1
Builder

Solved by eval function

eval _time=strftime(_time, "%y-%m-%d %I:%M:%S")

Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...