<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Is there a function to turn a time range into human-readable string? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-there-a-function-to-turn-a-time-range-into-human-readable/m-p/461995#M30313</link>
    <description>&lt;P&gt;Check out the &lt;CODE&gt;reltime&lt;/CODE&gt; function.&lt;/P&gt;</description>
    <pubDate>Fri, 13 Dec 2019 20:27:34 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2019-12-13T20:27:34Z</dc:date>
    <item>
      <title>Is there a function to turn a time range into human-readable string?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-there-a-function-to-turn-a-time-range-into-human-readable/m-p/461994#M30312</link>
      <description>&lt;P&gt;I've created a dashboard with a shared "time-input" (named &lt;CODE&gt;range&lt;/CODE&gt;) -- all of the panels refer to it:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;      &amp;lt;earliest&amp;gt;$range.earliest$&amp;lt;/earliest&amp;gt;
      &amp;lt;latest&amp;gt;$range.latest$&amp;lt;/latest&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I'd like each panel's title to reflect the currently-picked range -- showing it in human-readable form like "Last 4 hours" or "Yesterday from 2am to 3am". Is this possible?&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;Update&lt;/EM&gt;: Ok, I found I can add something like this to the titles:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... between $range.earliest$ and $range.latest$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and it will be translated to, for example &lt;CODE&gt;between -7d@h and now&lt;/CODE&gt;. Maybe, there are better alternatives?..&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2019 19:38:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-there-a-function-to-turn-a-time-range-into-human-readable/m-p/461994#M30312</guid>
      <dc:creator>unitedmarsupial</dc:creator>
      <dc:date>2019-12-13T19:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a function to turn a time range into human-readable string?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-there-a-function-to-turn-a-time-range-into-human-readable/m-p/461995#M30313</link>
      <description>&lt;P&gt;Check out the &lt;CODE&gt;reltime&lt;/CODE&gt; function.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2019 20:27:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-there-a-function-to-turn-a-time-range-into-human-readable/m-p/461995#M30313</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-12-13T20:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a function to turn a time range into human-readable string?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-there-a-function-to-turn-a-time-range-into-human-readable/m-p/461996#M30314</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| addinfo 
| eval _time=info_max_time 
| reltime 
| rename reltime as last_time 
| eval _time=info_min_time 
| reltime 
| rename reltime as first_time
| eval output_text="Search period: between ".first_time." to ".last_time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;you can hide the panel and pass &lt;CODE&gt;output_text&lt;/CODE&gt; in tokens.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2019 22:37:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-there-a-function-to-turn-a-time-range-into-human-readable/m-p/461996#M30314</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2019-12-13T22:37:54Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a function to turn a time range into human-readable string?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-there-a-function-to-turn-a-time-range-into-human-readable/m-p/461997#M30315</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;Check this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;input type="time" searchWhenChanged="true"&amp;gt;
        &amp;lt;label&amp;gt;Enter the time range&amp;lt;/label&amp;gt;
        &amp;lt;default&amp;gt;
          &amp;lt;earliest&amp;gt;-1d@d&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;@d&amp;lt;/latest&amp;gt;
        &amp;lt;/default&amp;gt;
        &amp;lt;change&amp;gt;
          &amp;lt;set token="displayTime"&amp;gt;($label$)&amp;lt;/set&amp;gt;
        &amp;lt;/change&amp;gt;
      &amp;lt;/input&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 13 Dec 2019 23:19:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-there-a-function-to-turn-a-time-range-into-human-readable/m-p/461997#M30315</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2019-12-13T23:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a function to turn a time range into human-readable string?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-there-a-function-to-turn-a-time-range-into-human-readable/m-p/461998#M30316</link>
      <description>&lt;P&gt;It is enough to use in the &lt;CODE&gt;Last something&lt;/CODE&gt;.&lt;BR /&gt;
If &lt;CODE&gt;Today&lt;/CODE&gt; is specified, it is regrettable that it will be &lt;CODE&gt;Custom time&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2019 23:42:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-there-a-function-to-turn-a-time-range-into-human-readable/m-p/461998#M30316</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2019-12-13T23:42:40Z</dc:date>
    </item>
  </channel>
</rss>

