Dashboards & Visualizations

How to display the label from the time field token from the time picker?

dbcase
Motivator

Hi,

I would like to display the label from the time field token from the time picker. I can display the value by using (timefield).earliest but it shows up as -24h@h which is sorta readable but not as good as Last 24 hrs. How can I display the label vs the value?

0 Karma
1 Solution

niketn
Legend

@dbcase case, please refer to one of my recent answers. Hope you are looking for the same: https://answers.splunk.com/answers/633356/whats-the-token-name-for-the-time-pickers-display.html

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

View solution in original post

niketn
Legend

@dbcase case, please refer to one of my recent answers. Hope you are looking for the same: https://answers.splunk.com/answers/633356/whats-the-token-name-for-the-time-pickers-display.html

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

dbcase
Motivator

Hi Niketnialy,

This one worked perfect

  <input type="time" searchWhenChanged="true">
       <label>Enter time range</label>
       <default>
         <earliest>-1d@d</earliest>
         <latest>@d</latest>
       </default>
       <change>
         <set token="displayTime">($label$)</set>
       </change>
     </input>
Get Updates on the Splunk Community!

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...

What’s New in Splunk Observability – September 2025

What's NewWe are excited to announce the latest enhancements to Splunk Observability, designed to help ITOps ...

Fun with Regular Expression - multiples of nine

Fun with Regular Expression - multiples of nineThis challenge was first posted on Slack #regex channel ...