<?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: Help with search for specific dates? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-with-search-for-specific-dates/m-p/631630#M219372</link>
    <description>&lt;P&gt;Normalize timestamps by using the &lt;FONT face="courier new,courier"&gt;strptime&lt;/FONT&gt; function to convert them into internal (epoch) form.&lt;/P&gt;</description>
    <pubDate>Mon, 20 Feb 2023 20:03:24 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2023-02-20T20:03:24Z</dc:date>
    <item>
      <title>Help with search for specific dates?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-search-for-specific-dates/m-p/628875#M218449</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Could you help me in editing the below search&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;index=test sourcetype="centino" | stats count, values(change_asset) as changed_asset, values(brief) as description, values(severity) as severity, values(exploitation_method) as exploitation_method, values(first_find) as first_find, values(last_find) as last_find,  , values(systems) as system by id.&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;1. In the below output of fields we need to display only the date 2023-01-22&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;first_find&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;last_find&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AL3Z_0-1675099386157.jpeg" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/23612iC6B5A81399645DEF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AL3Z_0-1675099386157.jpeg" alt="AL3Z_0-1675099386157.jpeg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;2. Instead of receiving all the notifications we require, if today's date matches the first _find or the last_find, raise an alert&lt;BR /&gt;&lt;SPAN&gt;*todays date will change every day do not bound that with actual todays date*&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Thanks...&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 18:28:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-search-for-specific-dates/m-p/628875#M218449</guid>
      <dc:creator>AL3Z</dc:creator>
      <dc:date>2023-01-30T18:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: Help with search for specific dates?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-search-for-specific-dates/m-p/628890#M218454</link>
      <description>&lt;P&gt;There are a few ways to reduce the timestamp to just the date.&amp;nbsp; The &lt;FONT face="courier new,courier"&gt;substr()&lt;/FONT&gt; function may be the easiest.&lt;/P&gt;&lt;P&gt;Use the &lt;FONT face="courier new,courier"&gt;now()&lt;/FONT&gt; function to get the current timestamp and the &lt;FONT face="courier new,courier"&gt;strftime()&lt;/FONT&gt; function to convert it into the same format as first_find and last_find.&amp;nbsp; Then the &lt;FONT face="courier new,courier"&gt;where&lt;/FONT&gt; command can compare them and only show events from today.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=test sourcetype="issues" 
| eval first_find=substr(first_find, 1, 10), last_find=substr(last_find, 1, 10)
| stats count, values(change_asset) as changed_asset, values(brief) as description, values(severity) as severity, values(exploitation_method) as exploitation_method, values(first_find) as first_find, values(last_find) as last_find,  , values(systems) as system by id
| eval today = strftime(now(), "%Y-%m-%d")
| where (match(first_find, today) OR match(last_find, today))&lt;/LI-CODE&gt;&lt;P&gt;Note that this query may not work properly if first_find and last_find are multi-value fields.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 18:57:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-search-for-specific-dates/m-p/628890#M218454</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-01-30T18:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: Help with search for specific dates?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-search-for-specific-dates/m-p/628919#M218462</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;@itwishperer&lt;BR /&gt;@&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;what if we have a multi valued fields,could you&amp;nbsp; pls make a search according to that&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks..&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jan 2023 16:19:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-search-for-specific-dates/m-p/628919#M218462</guid>
      <dc:creator>AL3Z</dc:creator>
      <dc:date>2023-01-31T16:19:55Z</dc:date>
    </item>
    <item>
      <title>Re: Help with search for specific dates?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-search-for-specific-dates/m-p/629013#M218486</link>
      <description>&lt;P&gt;The concept of more than one "first" or "last" anything baffles me so here is a query that eliminates mutli-value firsts and lasts.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=test sourcetype="issues" 
| eval first_find=substr(first_find, 1, 10), last_find=substr(last_find, 1, 10)
| stats count, values(change_asset) as changed_asset, values(brief) as description, values(severity) as severity, values(exploitation_method) as exploitation_method, earliest(first_find) as first_find, latest(last_find) as last_find, values(systems) as system by id
| eval today = strftime(now(), "%Y-%m-%d")
| where (match(first_find, today) OR match(last_find, today))&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 31 Jan 2023 15:52:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-search-for-specific-dates/m-p/629013#M218486</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-01-31T15:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: Help with search for specific dates?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-search-for-specific-dates/m-p/629088#M218514</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;This query is same as first query.&lt;/P&gt;&lt;P&gt;What the difference ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2023 07:21:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-search-for-specific-dates/m-p/629088#M218514</guid>
      <dc:creator>AL3Z</dc:creator>
      <dc:date>2023-02-01T07:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: Help with search for specific dates?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-search-for-specific-dates/m-p/629135#M218535</link>
      <description>&lt;P&gt;The difference is the second query uses &lt;FONT face="courier new,courier"&gt;earliest&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;latest&lt;/FONT&gt; instead of &lt;FONT face="courier new,courier"&gt;values&lt;/FONT&gt; for the first_find and last_find fields to avoid multi-value results.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2023 13:29:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-search-for-specific-dates/m-p/629135#M218535</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-02-01T13:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: Help with search for specific dates?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-search-for-specific-dates/m-p/631585#M219363</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;this search is not raising any alerts, what could be the problem, the first find and last time fields time in events looks like UTC time, do we need to normalise to IST to get it match if so how we can normalise it.&lt;BR /&gt;thnks.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2023 14:26:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-search-for-specific-dates/m-p/631585#M219363</guid>
      <dc:creator>AL3Z</dc:creator>
      <dc:date>2023-02-20T14:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: Help with search for specific dates?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-search-for-specific-dates/m-p/631630#M219372</link>
      <description>&lt;P&gt;Normalize timestamps by using the &lt;FONT face="courier new,courier"&gt;strptime&lt;/FONT&gt; function to convert them into internal (epoch) form.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2023 20:03:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-search-for-specific-dates/m-p/631630#M219372</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-02-20T20:03:24Z</dc:date>
    </item>
  </channel>
</rss>

