<?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: How to compare CutoffTime with current time in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-CutoffTime-with-current-time/m-p/590289#M205516</link>
    <description>&lt;P&gt;I was able to figure out working query.Yes I have used similar logic mentioned by you.Thanks for the response.&lt;/P&gt;</description>
    <pubDate>Tue, 22 Mar 2022 18:51:51 GMT</pubDate>
    <dc:creator>pradeepkm</dc:creator>
    <dc:date>2022-03-22T18:51:51Z</dc:date>
    <item>
      <title>How to compare CutoffTime with current time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-CutoffTime-with-current-time/m-p/590050#M205430</link>
      <description>&lt;P&gt;&amp;nbsp;I have created a lookup table with filename and cutofftime within which we have to receive the file. I have to compare Cutofftime to check if its falling within 30 mins of current time and retrieve that particular file name from lookup&amp;nbsp; and search for it. Please help me with query&lt;/P&gt;</description>
      <pubDate>Wed, 23 Mar 2022 04:16:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-CutoffTime-with-current-time/m-p/590050#M205430</guid>
      <dc:creator>pradeepkm</dc:creator>
      <dc:date>2022-03-23T04:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare CutoffTime with current time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-CutoffTime-with-current-time/m-p/590285#M205514</link>
      <description>&lt;P&gt;Assuming your lookup field for cutofftime has epoch value, you can retrieve the filename based on your condition like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup yourLookupName.csv | table filename cutofftime | where abs(cutofftime-now())&amp;lt;=1800 | table filename&lt;/LI-CODE&gt;&lt;P&gt;If it's in some specific string timestamp format, replace "abs(cutofftime-now())" with "abs(strptime(cutofftime,"Your Time Format")-now()".&amp;nbsp; Find your &lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.5/SearchReference/Commontimeformatvariables" target="_self"&gt;Timeformat here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Once you finalize your above query, your search data for your retrieved file like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=YourIndex sourcetype=YourSourcetype [| your finalized query | which will give filename. your may have to rename field 'filename' to field name that your index/sourcetype has] &lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 22 Mar 2022 18:05:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-CutoffTime-with-current-time/m-p/590285#M205514</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2022-03-22T18:05:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare CutoffTime with current time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-compare-CutoffTime-with-current-time/m-p/590289#M205516</link>
      <description>&lt;P&gt;I was able to figure out working query.Yes I have used similar logic mentioned by you.Thanks for the response.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 18:51:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-compare-CutoffTime-with-current-time/m-p/590289#M205516</guid>
      <dc:creator>pradeepkm</dc:creator>
      <dc:date>2022-03-22T18:51:51Z</dc:date>
    </item>
  </channel>
</rss>

