<?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: Get values Time range in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Get-values-Time-range/m-p/742145#M240782</link>
    <description>&lt;P&gt;Thank you for your help, it helped me a lot in solving my problem.&lt;/P&gt;</description>
    <pubDate>Tue, 18 Mar 2025 18:52:39 GMT</pubDate>
    <dc:creator>Jailson</dc:creator>
    <dc:date>2025-03-18T18:52:39Z</dc:date>
    <item>
      <title>Get values Time range</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-values-Time-range/m-p/741034#M240525</link>
      <description>&lt;P&gt;I have a survey that has a date field deletion_date. How can I filter this field by the&lt;BR /&gt;Time range?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;sourcetype=access_* status=200 action=purchase | top categoryId
|where deletion_date &amp;gt; ?&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Date.PNG" style="width: 665px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/38037iEF66C0B2AB17823B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Date.PNG" alt="Date.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2025 16:22:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-values-Time-range/m-p/741034#M240525</guid>
      <dc:creator>Jailson</dc:creator>
      <dc:date>2025-03-06T16:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: Get values Time range</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-values-Time-range/m-p/741035#M240526</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/308292"&gt;@Jailson&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What exactly are you looking for? Could you elaborate a bit more?&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2025 16:57:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-values-Time-range/m-p/741035#M240526</guid>
      <dc:creator>kiran_panchavat</dc:creator>
      <dc:date>2025-03-06T16:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: Get values Time range</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-values-Time-range/m-p/741038#M240528</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/308292"&gt;@Jailson&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;the timepicker works only on _time and not on a field like&amp;nbsp;&lt;SPAN&gt;deletion_date.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If you want to filter your data using this filter you have to add it to the main search.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In addition after the top command you have only the fields in the command, in your case: categoryId, perc, count.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If you want to filter your data for&amp;nbsp;deletion_date, you have to put this filter in the main search or before the top command, obviously, if you have this field in your data.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The syntax depends on the format of yor&amp;nbsp;deletion_date field, e.g. if it's in format "yyyy-mm-dd" and you want to filter results if&amp;nbsp;deletion_date&amp;gt;2024-12-31, you should use something like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;sourcetype=access_* status=200 action=purchase 
| eval 
     deletion_date_epoch=strptime(deletion_date,"%Y-%m-%d"),
     deletion_date_filter_epoch=strptime("2024-12-31","%Y-%m-%d")
| where deletion_date_epoch&amp;gt;deletion_date_filter_epoch
| top categoryId&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2025 17:09:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-values-Time-range/m-p/741038#M240528</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2025-03-06T17:09:05Z</dc:date>
    </item>
    <item>
      <title>Re: Get values Time range</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-values-Time-range/m-p/741060#M240542</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/308292"&gt;@Jailson&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What time format is your&amp;nbsp;deletion_date in?&lt;/P&gt;&lt;P&gt;If so and you plan to use this approach in a dashboard then you can use tokens from the time picker and relative_time to use the time picker as a filter. Note that you will still need to apply an earliest/latest to your main part of the search, this will only filter.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;form version="1.1" theme="light"&amp;gt;
  &amp;lt;label&amp;gt;xmltest&amp;lt;/label&amp;gt;
  &amp;lt;fieldset submitButton="false"&amp;gt;
    &amp;lt;input type="time" token="field1"&amp;gt;
      &amp;lt;label&amp;gt;&amp;lt;/label&amp;gt;
      &amp;lt;default&amp;gt;
        &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
        &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
      &amp;lt;/default&amp;gt;
    &amp;lt;/input&amp;gt;
  &amp;lt;/fieldset&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;| makeresults 
| eval deletion_date=now()-7200
| where deletion_date&amp;amp;gt;relative_time(now(),"$field1.earliest$")&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="refresh.display"&amp;gt;progressbar&amp;lt;/option&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/form&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;Please let me know how you get on and consider adding karma to this or any other answer if it has helped.&lt;BR /&gt;Regards&lt;/P&gt;&lt;P&gt;Will&lt;/P&gt;</description>
      <pubDate>Thu, 06 Mar 2025 22:35:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-values-Time-range/m-p/741060#M240542</guid>
      <dc:creator>livehybrid</dc:creator>
      <dc:date>2025-03-06T22:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: Get values Time range</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-values-Time-range/m-p/742145#M240782</link>
      <description>&lt;P&gt;Thank you for your help, it helped me a lot in solving my problem.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Mar 2025 18:52:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-values-Time-range/m-p/742145#M240782</guid>
      <dc:creator>Jailson</dc:creator>
      <dc:date>2025-03-18T18:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: Get values Time range</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-values-Time-range/m-p/742146#M240783</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thank you all for your help, it helped me a lot in solving my problem.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Mar 2025 18:53:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-values-Time-range/m-p/742146#M240783</guid>
      <dc:creator>Jailson</dc:creator>
      <dc:date>2025-03-18T18:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: Get values Time range</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Get-values-Time-range/m-p/742179#M240792</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/308292"&gt;@Jailson&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;good for you, see next time!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated by all the contributors &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Mar 2025 09:52:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Get-values-Time-range/m-p/742179#M240792</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2025-03-19T09:52:20Z</dc:date>
    </item>
  </channel>
</rss>

