<?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 retrieve events from the most recent day in which there are events present? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-retrieve-events-from-the-most-recent-day-in-which-there/m-p/328871#M97891</link>
    <description>&lt;P&gt;There are a number of ways, and with this small number of events, any of them are fine&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;earliest=-4d@d latest=@d   your search for the events 
| bin _time as theDate span=1d
| eventstats max(theDate) as maxDate 
| where theDate=maxDate
| fields - theDate maxDate
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 24 Jul 2017 22:55:27 GMT</pubDate>
    <dc:creator>DalJeanis</dc:creator>
    <dc:date>2017-07-24T22:55:27Z</dc:date>
    <item>
      <title>How to retrieve events from the most recent day in which there are events present?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-retrieve-events-from-the-most-recent-day-in-which-there/m-p/328870#M97890</link>
      <description>&lt;P&gt;I have a small number of events (around 4 or 5) being generated each day Monday through Friday. I would like my search to return the most recent weekday's events. However, if I use a simple "Today" relative search, and the search is run on a Saturday or Sunday, no results will appear. Instead, it should grab &lt;STRONG&gt;the preceding Friday's&lt;/STRONG&gt; events . Is there a simple way to do this I'm missing?&lt;/P&gt;

&lt;P&gt;For instance, on Thursday July 20th, only the events that occurred that day will appear. On Friday, only those on July 21st. On Saturday  the 22nd or Sunday the 23rd, only the events from Friday July 21st show up. Then, on Monday July 24th, the events from Monday the 24th appear. &lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2017 20:19:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-retrieve-events-from-the-most-recent-day-in-which-there/m-p/328870#M97890</guid>
      <dc:creator>tgittelmacher</dc:creator>
      <dc:date>2017-07-24T20:19:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve events from the most recent day in which there are events present?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-retrieve-events-from-the-most-recent-day-in-which-there/m-p/328871#M97891</link>
      <description>&lt;P&gt;There are a number of ways, and with this small number of events, any of them are fine&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;earliest=-4d@d latest=@d   your search for the events 
| bin _time as theDate span=1d
| eventstats max(theDate) as maxDate 
| where theDate=maxDate
| fields - theDate maxDate
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 24 Jul 2017 22:55:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-retrieve-events-from-the-most-recent-day-in-which-there/m-p/328871#M97891</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-07-24T22:55:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve events from the most recent day in which there are events present?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-retrieve-events-from-the-most-recent-day-in-which-there/m-p/328872#M97892</link>
      <description>&lt;P&gt;Seems to work like a charm. Much appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2017 20:30:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-retrieve-events-from-the-most-recent-day-in-which-there/m-p/328872#M97892</guid>
      <dc:creator>tgittelmacher</dc:creator>
      <dc:date>2017-08-16T20:30:43Z</dc:date>
    </item>
  </channel>
</rss>

