<?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: Using Time Picker Tokens in Other Search Time in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-Time-Picker-Tokens-in-Other-Search-Time/m-p/377723#M24722</link>
    <description>&lt;P&gt;Glad it worked for you! Have an awesome weekend ahead!&lt;/P&gt;</description>
    <pubDate>Sat, 20 Jul 2019 03:06:52 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2019-07-20T03:06:52Z</dc:date>
    <item>
      <title>Using Time Picker Tokens in Other Search Time</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-Time-Picker-Tokens-in-Other-Search-Time/m-p/377720#M24719</link>
      <description>&lt;P&gt;I am trying to create a dashboard in which the results of one query can be compared to the results of the same query from 24 hours prior. Due to the volume of events that my search generates, it is best to keep the timeframe restricted to 15 minutes (or similar short spans). Is there a way to use the time tokens of one search to set the timeframe for the search for the day prior e.g. from 2:00 to 2:15 on 7/11/19 as compared to 2:00 to 2:15 on 7/10/19? &lt;BR /&gt;
I have tried using the default tokens of &lt;CODE&gt;$time1.earliest$&lt;/CODE&gt; and &lt;CODE&gt;$time1.latest$&lt;/CODE&gt; in another searches time quantifiers, but &lt;CODE&gt;$time1.earliest$-24h&lt;/CODE&gt; and &lt;CODE&gt;$time1.latest$-24h&lt;/CODE&gt; gives an error, saying that the latest time can not be before earlier time.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2019 19:35:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Using-Time-Picker-Tokens-in-Other-Search-Time/m-p/377720#M24719</guid>
      <dc:creator>dsitek</dc:creator>
      <dc:date>2019-07-11T19:35:55Z</dc:date>
    </item>
    <item>
      <title>Re: Using Time Picker Tokens in Other Search Time</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-Time-Picker-Tokens-in-Other-Search-Time/m-p/377721#M24720</link>
      <description>&lt;P&gt;@dsitek refer to one of my older answer with two approaches to get the epoch earliest and latest time from Time Picker using either &lt;CODE&gt;independent search&lt;/CODE&gt; or &lt;CODE&gt;&amp;lt;eval&amp;gt;&lt;/CODE&gt;. Whichever approach you use you can subtract &lt;CODE&gt;86400&lt;/CODE&gt; to get epoch time with &lt;CODE&gt;-24h&lt;/CODE&gt; &lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/578984/running-one-of-two-searches-based-on-time-picker-s.html"&gt;https://answers.splunk.com/answers/578984/running-one-of-two-searches-based-on-time-picker-s.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Let us know if you need further assistance.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2019 01:28:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Using-Time-Picker-Tokens-in-Other-Search-Time/m-p/377721#M24720</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-07-19T01:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: Using Time Picker Tokens in Other Search Time</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-Time-Picker-Tokens-in-Other-Search-Time/m-p/377722#M24721</link>
      <description>&lt;P&gt;@niketnilay I was able to use your solution to convert the time tokens into epochs so that I could use them in my second search and run it a single day prior to the first search. Thank you so much.&lt;BR /&gt;
For those who do not wish to read the full solution, I added the following search to the top of my dashboard:&lt;BR /&gt;
  `Access Logs Test&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;query&amp;gt;| makeresults
 &amp;lt;/query&amp;gt;
&amp;lt;earliest&amp;gt;$time1.earliest$&amp;lt;/earliest&amp;gt;
&amp;lt;latest&amp;gt;$time1.latest$&amp;lt;/latest&amp;gt;
&amp;lt;done&amp;gt;
  &amp;lt;eval token="tokEarliestTime1"&amp;gt;strptime($job.earliestTime$,"%Y/%m/%d %H:%M:%S %p")&amp;lt;/eval&amp;gt;
  &amp;lt;eval token="tokLatestTime1"&amp;gt;strptime($job.latestTime$,"%Y/%m/%d %H:%M:%S %p")&amp;lt;/eval&amp;gt;
  &amp;lt;eval token="tokEarliestTime2"&amp;gt;tokEarliestTime1-86400&amp;lt;/eval&amp;gt;
  &amp;lt;eval token="tokLatestTime2"&amp;gt;tokLatestTime1-86400&amp;lt;/eval&amp;gt;
&amp;lt;/done&amp;gt;`
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I then used the tokens &lt;CODE&gt;tokEarliestTime2&lt;/CODE&gt; and &lt;CODE&gt;tokLatestTime2&lt;/CODE&gt; as the time tokens for my second search.&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jul 2019 17:36:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Using-Time-Picker-Tokens-in-Other-Search-Time/m-p/377722#M24721</guid>
      <dc:creator>dsitek</dc:creator>
      <dc:date>2019-07-19T17:36:06Z</dc:date>
    </item>
    <item>
      <title>Re: Using Time Picker Tokens in Other Search Time</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-Time-Picker-Tokens-in-Other-Search-Time/m-p/377723#M24722</link>
      <description>&lt;P&gt;Glad it worked for you! Have an awesome weekend ahead!&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jul 2019 03:06:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Using-Time-Picker-Tokens-in-Other-Search-Time/m-p/377723#M24722</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2019-07-20T03:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: Using Time Picker Tokens in Other Search Time</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Using-Time-Picker-Tokens-in-Other-Search-Time/m-p/377724#M24723</link>
      <description>&lt;P&gt;You as well!&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jul 2019 05:11:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Using-Time-Picker-Tokens-in-Other-Search-Time/m-p/377724#M24723</guid>
      <dc:creator>dsitek</dc:creator>
      <dc:date>2019-07-20T05:11:07Z</dc:date>
    </item>
  </channel>
</rss>

