<?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 How to find time range duration or value? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-time-range-duration-or-value/m-p/342733#M101526</link>
    <description>&lt;P&gt;In searching, I understand that I can specify the time range using one of the presets (like "Last 4 hours") or set it with SPL (e.g., &lt;CODE&gt;earliest=10/19/2017:0:0:0 latest=10/27/2017:0:0:0&lt;/CODE&gt;).&lt;/P&gt;

&lt;P&gt;My question is different. Is there a variable that can tell me what the duration of the time range being used is? For example, if I used "Last 4 hours", I would expect this field to tell me 240 minutes, and if I used "Last 60 minutes", I would expect the field is tell me 60 minutes.&lt;/P&gt;

&lt;P&gt;Motivation for this question: I would like to compute the aggregate queries per second over some time range, so I could just do &lt;CODE&gt;stats count | eval queriesPerSecond=count/durationVar&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 08 Mar 2018 22:34:56 GMT</pubDate>
    <dc:creator>flow2k</dc:creator>
    <dc:date>2018-03-08T22:34:56Z</dc:date>
    <item>
      <title>How to find time range duration or value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-time-range-duration-or-value/m-p/342733#M101526</link>
      <description>&lt;P&gt;In searching, I understand that I can specify the time range using one of the presets (like "Last 4 hours") or set it with SPL (e.g., &lt;CODE&gt;earliest=10/19/2017:0:0:0 latest=10/27/2017:0:0:0&lt;/CODE&gt;).&lt;/P&gt;

&lt;P&gt;My question is different. Is there a variable that can tell me what the duration of the time range being used is? For example, if I used "Last 4 hours", I would expect this field to tell me 240 minutes, and if I used "Last 60 minutes", I would expect the field is tell me 60 minutes.&lt;/P&gt;

&lt;P&gt;Motivation for this question: I would like to compute the aggregate queries per second over some time range, so I could just do &lt;CODE&gt;stats count | eval queriesPerSecond=count/durationVar&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 22:34:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-time-range-duration-or-value/m-p/342733#M101526</guid>
      <dc:creator>flow2k</dc:creator>
      <dc:date>2018-03-08T22:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to find time range duration or value?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-find-time-range-duration-or-value/m-p/342734#M101527</link>
      <description>&lt;P&gt;you could pipe to the &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Addinfo" target="_blank"&gt;addinfo command&lt;/A&gt;, which will add fields for info_min_time and info_max_time to your events.  And then you could do the math from there.  Of course, you'd have to determine how to handle odd scenarios like "All Time"...&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:23:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-find-time-range-duration-or-value/m-p/342734#M101527</guid>
      <dc:creator>maciep</dc:creator>
      <dc:date>2020-09-29T18:23:41Z</dc:date>
    </item>
  </channel>
</rss>

