<?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: Error comparing Dates in Metadata search in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Error-comparing-Dates-in-Metadata-search/m-p/134225#M36675</link>
    <description>&lt;P&gt;Your search will show 'false' if a source hasn't produced any events in the past 60 days. For most cases, your sources will be more talkative than that, right? So 'true' would be the expected result. Looking at the timestamps in the table that the search produces, does this seem to be right?&lt;/P&gt;

&lt;P&gt;At least I can get it to work in this fashion. However, you'll need an &lt;CODE&gt;OR&lt;/CODE&gt; between the &lt;CODE&gt;source&lt;/CODE&gt;s in the second element of the search query.&lt;/P&gt;

&lt;P&gt;/K&lt;/P&gt;</description>
    <pubDate>Fri, 08 Nov 2013 07:53:39 GMT</pubDate>
    <dc:creator>kristian_kolb</dc:creator>
    <dc:date>2013-11-08T07:53:39Z</dc:date>
    <item>
      <title>Error comparing Dates in Metadata search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Error-comparing-Dates-in-Metadata-search/m-p/134224#M36674</link>
      <description>&lt;P&gt;I'm trying to compare the lastTime from a metadata search, with a relative time to now...&lt;/P&gt;

&lt;P&gt;Unfortunatly the comparison doesn't work, I don't understand why&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| metadata type=sources | search source=*kivdv.business.msg.* source=*dfi.in.log  | eval now=relative_time(now(),"-60d@d")  | eval last_gt_now=if(lastTime &amp;gt; now,"true","false") |   convert ctime(lastTime),ctime(now) |  table lastTime,now,last_gt_now,source
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;See screenshot, last_gt_now is always true !&lt;IMG src="http://answers.splunk.com//storage/splunk_meta.png" alt="alt text" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:14:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Error-comparing-Dates-in-Metadata-search/m-p/134224#M36674</guid>
      <dc:creator>sbsbb</dc:creator>
      <dc:date>2020-09-28T15:14:04Z</dc:date>
    </item>
    <item>
      <title>Re: Error comparing Dates in Metadata search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Error-comparing-Dates-in-Metadata-search/m-p/134225#M36675</link>
      <description>&lt;P&gt;Your search will show 'false' if a source hasn't produced any events in the past 60 days. For most cases, your sources will be more talkative than that, right? So 'true' would be the expected result. Looking at the timestamps in the table that the search produces, does this seem to be right?&lt;/P&gt;

&lt;P&gt;At least I can get it to work in this fashion. However, you'll need an &lt;CODE&gt;OR&lt;/CODE&gt; between the &lt;CODE&gt;source&lt;/CODE&gt;s in the second element of the search query.&lt;/P&gt;

&lt;P&gt;/K&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2013 07:53:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Error-comparing-Dates-in-Metadata-search/m-p/134225#M36675</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-11-08T07:53:39Z</dc:date>
    </item>
    <item>
      <title>Re: Error comparing Dates in Metadata search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Error-comparing-Dates-in-Metadata-search/m-p/134226#M36676</link>
      <description>&lt;P&gt;I'm sorry I've forgotten the screenshot... take a look at the results...&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2013 08:01:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Error-comparing-Dates-in-Metadata-search/m-p/134226#M36676</guid>
      <dc:creator>sbsbb</dc:creator>
      <dc:date>2013-11-08T08:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: Error comparing Dates in Metadata search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Error-comparing-Dates-in-Metadata-search/m-p/134227#M36677</link>
      <description>&lt;P&gt;Running the query without the filter here gives me trues and falses correctly at the 60 day cutoff.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2013 08:24:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Error-comparing-Dates-in-Metadata-search/m-p/134227#M36677</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-11-08T08:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: Error comparing Dates in Metadata search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Error-comparing-Dates-in-Metadata-search/m-p/134228#M36678</link>
      <description>&lt;P&gt;sbsbb, yes. The screenshot shows all 'true' - as it should. All dates for last_gt_now are more recent than 60 days ago.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:14:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Error-comparing-Dates-in-Metadata-search/m-p/134228#M36678</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2020-09-28T15:14:11Z</dc:date>
    </item>
    <item>
      <title>Re: Error comparing Dates in Metadata search</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Error-comparing-Dates-in-Metadata-search/m-p/134229#M36679</link>
      <description>&lt;P&gt;Your search workes fine and provides false value as well for last_gt_now if lastTime is actually less than now.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:14:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Error-comparing-Dates-in-Metadata-search/m-p/134229#M36679</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2020-09-28T15:14:13Z</dc:date>
    </item>
  </channel>
</rss>

