Splunk Search

How to display time in string format?

carlyleadmin
Contributor

Hi, I have a simple search that brings up the total count of logons in a day but I want the time part to say April,16,17,18 and so on instead of 2018-04-16 00:00:00. How can one achieve that?

alt text

0 Karma
1 Solution

damien_chillet
Builder

Add the following at the end of your search:

| convert timeformat="%B %d" ctime(_time)

View solution in original post

0 Karma

damien_chillet
Builder

Add the following at the end of your search:

| convert timeformat="%B %d" ctime(_time)
0 Karma

carlyleadmin
Contributor

Thanks Damien for the quick response. works like a charm

0 Karma

damien_chillet
Builder

You welcome! (:

0 Karma
Get Updates on the Splunk Community!

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!

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

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...