<?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: Comparisons in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Comparisons/m-p/512680#M143801</link>
    <description>&lt;P&gt;Thank you ,but is not giving me the any output&lt;/P&gt;</description>
    <pubDate>Thu, 06 Aug 2020 06:28:03 GMT</pubDate>
    <dc:creator>renuka</dc:creator>
    <dc:date>2020-08-06T06:28:03Z</dc:date>
    <item>
      <title>Comparisons</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparisons/m-p/512555#M143762</link>
      <description>&lt;P&gt;If suppose i have two Phases with first and last date&lt;BR /&gt;Phase 1=1 JAN 2020, 1 March 2020&lt;/P&gt;&lt;P&gt;Phase2=1Apr 2020,1jun 2020&lt;/P&gt;&lt;P&gt;if i get execution date as &lt;U&gt;&lt;STRONG&gt;3 Feb 2020&lt;/STRONG&gt; &lt;/U&gt;then my verified&amp;nbsp; Column should be displayed as Phase 1 otherwise Phase 2&lt;BR /&gt;&amp;nbsp;Example:&lt;/P&gt;&lt;TABLE width="256"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="64px" height="24px"&gt;id&lt;/TD&gt;&lt;TD width="68.1667px" height="24px"&gt;verified&amp;nbsp;&lt;/TD&gt;&lt;TD width="123.1px" height="24px"&gt;execution Date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="64px" height="24px"&gt;1&lt;/TD&gt;&lt;TD width="68.1667px" height="24px"&gt;Phase1&lt;/TD&gt;&lt;TD width="81.05px" height="24px"&gt;3-Feb-20&lt;/TD&gt;&lt;TD width="42.05px" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="64px" height="24px"&gt;2&lt;/TD&gt;&lt;TD width="68.1667px" height="24px"&gt;Phase1&lt;/TD&gt;&lt;TD width="81.05px" height="24px"&gt;4-Feb-20&lt;/TD&gt;&lt;TD width="42.05px" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="64px" height="24px"&gt;3&lt;/TD&gt;&lt;TD width="68.1667px" height="24px"&gt;Phase1&lt;/TD&gt;&lt;TD width="81.05px" height="24px"&gt;5-Feb-20&lt;/TD&gt;&lt;TD width="42.05px" height="24px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 13:38:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparisons/m-p/512555#M143762</guid>
      <dc:creator>renuka</dc:creator>
      <dc:date>2020-08-05T13:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: Comparisons</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparisons/m-p/512567#M143767</link>
      <description>Please explain the relationship among first date, last date, execution date, and verified. The text says verified of "Phase 1" is when execution date = 3 Feb 2020, but the sample output shows "Phase 1" for all execution dates.</description>
      <pubDate>Wed, 05 Aug 2020 14:12:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparisons/m-p/512567#M143767</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-08-05T14:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: Comparisons</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparisons/m-p/512569#M143768</link>
      <description>&lt;P&gt;we have implementation field where it contains values Phase 1 And Phase 2&lt;/P&gt;&lt;P&gt;First Date&amp;nbsp; And Last Date&amp;nbsp; will extract through lookup.&lt;BR /&gt;we have&amp;nbsp; separate mapping. csv&amp;nbsp; file where we have the phase 1 and phase 2&amp;nbsp; dates&lt;/P&gt;&lt;P&gt;we need to extract&amp;nbsp; verified column by comparing the first and last date with execution date&lt;BR /&gt;&amp;nbsp;if execution date is in between the First date and last date it should give me that phase&lt;/P&gt;&lt;P&gt;example: if my execution date is 03 Feb 2020&lt;/P&gt;&lt;P&gt;it is coming in the duration of Phase 1 i.e Phase1= 01 jan 2020-01mar 2020&lt;/P&gt;&lt;P&gt;then we get output verified=phase1&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 14:26:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparisons/m-p/512569#M143768</guid>
      <dc:creator>renuka</dc:creator>
      <dc:date>2020-08-05T14:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: Comparisons</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparisons/m-p/512587#M143773</link>
      <description>&lt;P&gt;See if this helps.&amp;nbsp; To compare dates, they must first be converted into integers.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;...
| eval eFirstDate = strptime(first_date, "%d %b %Y"), eLastDate = strptime(last_date, "%d %b %Y"), eExecDate = strptime(execution_date, "%d %b %Y")
| eval verified = case(eExecDate &amp;lt; eLastDate, "Phase 1", 1==1, "Phase 2")
...&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 05 Aug 2020 14:51:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparisons/m-p/512587#M143773</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-08-05T14:51:04Z</dc:date>
    </item>
    <item>
      <title>Re: Comparisons</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparisons/m-p/512680#M143801</link>
      <description>&lt;P&gt;Thank you ,but is not giving me the any output&lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2020 06:28:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparisons/m-p/512680#M143801</guid>
      <dc:creator>renuka</dc:creator>
      <dc:date>2020-08-06T06:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: Comparisons</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparisons/m-p/512732#M143823</link>
      <description>My answer was a partial query. You must supply the beginning part to fetch data from the indexers.&lt;BR /&gt;Please share your full query.</description>
      <pubDate>Thu, 06 Aug 2020 12:22:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparisons/m-p/512732#M143823</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-08-06T12:22:39Z</dc:date>
    </item>
    <item>
      <title>Re: Comparisons</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparisons/m-p/512736#M143824</link>
      <description>&lt;P&gt;As I mentioned earlier, for date comparisons you have to convert them into epoch.&lt;/P&gt;&lt;P&gt;make sure your time formats are in proper format. for example month you mentioned sometime full month name, sometimes abbreviated month, difficult to write query if that is case, hence I have modified them in my below query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|makeresults 
| eval test="Phase 1=1 Jan 2020,1 Mar 2020|Phase 2=1 Apr 2020,1 Jun 2020"
| makemv test delim="|"
| mvexpand test
| rex field=test "(?&amp;lt;phase&amp;gt;[^\=]+)\=(?&amp;lt;first_date&amp;gt;[^\,]+)\,(?&amp;lt;last_date&amp;gt;.*)"
| eval verified_date="3 Feb 2020"
| eval first_date_epoch=strptime(first_date,"%d %b %Y"),last_date_epoch=strptime(last_date,"%d %b %Y"),verified_epoch=strptime(verified_date,"%d %b %Y")
| eval output = if( verified_epoch &amp;gt;=first_date_epoch AND verified_epoch&amp;lt;=last_date_epoch,"Phase1","Phase2")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Aug 2020 12:48:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparisons/m-p/512736#M143824</guid>
      <dc:creator>thambisetty</dc:creator>
      <dc:date>2020-08-06T12:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: Comparisons</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Comparisons/m-p/513243#M143989</link>
      <description>&lt;P&gt;Thank you so much ,I get the answers requried&lt;/P&gt;</description>
      <pubDate>Mon, 10 Aug 2020 05:19:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Comparisons/m-p/513243#M143989</guid>
      <dc:creator>renuka</dc:creator>
      <dc:date>2020-08-10T05:19:26Z</dc:date>
    </item>
  </channel>
</rss>

