<?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 How to create a search showing data starting on a Saturday up to current day in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-showing-data-starting-on-a-Saturday-up-to/m-p/481362#M134895</link>
    <description>&lt;P&gt;I have a customer that needs to have a dashboard showing a start date of Saturday and ending on the current workday. The search that I have tried, with no results, is:  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=| eval today=strftime(now(),"%a")
| eval Backdays=case(today=="Mon",2,today=="Tue",3,today=="Wed",4,today=="Thur",5,today=="Fri",6)
| search earliest=-"Backdays"d@d latest=now
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There is definitely data for this past Saturday, Sunday and today (Monday) and the "Backdays" field is populating with a 1 (in this case)&lt;/P&gt;

&lt;P&gt;Any help is most appreciated.&lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Mon, 02 Mar 2020 20:13:20 GMT</pubDate>
    <dc:creator>SteveBowser</dc:creator>
    <dc:date>2020-03-02T20:13:20Z</dc:date>
    <item>
      <title>How to create a search showing data starting on a Saturday up to current day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-showing-data-starting-on-a-Saturday-up-to/m-p/481362#M134895</link>
      <description>&lt;P&gt;I have a customer that needs to have a dashboard showing a start date of Saturday and ending on the current workday. The search that I have tried, with no results, is:  &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=| eval today=strftime(now(),"%a")
| eval Backdays=case(today=="Mon",2,today=="Tue",3,today=="Wed",4,today=="Thur",5,today=="Fri",6)
| search earliest=-"Backdays"d@d latest=now
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;There is definitely data for this past Saturday, Sunday and today (Monday) and the "Backdays" field is populating with a 1 (in this case)&lt;/P&gt;

&lt;P&gt;Any help is most appreciated.&lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Mar 2020 20:13:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-showing-data-starting-on-a-Saturday-up-to/m-p/481362#M134895</guid>
      <dc:creator>SteveBowser</dc:creator>
      <dc:date>2020-03-02T20:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a search showing data starting on a Saturday up to current day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-showing-data-starting-on-a-Saturday-up-to/m-p/481363#M134896</link>
      <description>&lt;P&gt;I'll answer my own question - &lt;BR /&gt;
earliest=@w6 latest=now&lt;/P&gt;

&lt;P&gt;No need for the evals.&lt;/P&gt;

&lt;P&gt;Have a great day!&lt;/P&gt;</description>
      <pubDate>Mon, 02 Mar 2020 20:54:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-showing-data-starting-on-a-Saturday-up-to/m-p/481363#M134896</guid>
      <dc:creator>SteveBowser</dc:creator>
      <dc:date>2020-03-02T20:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a search showing data starting on a Saturday up to current day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-showing-data-starting-on-a-Saturday-up-to/m-p/481364#M134897</link>
      <description>&lt;P&gt;Splunk can do that for you.  Use &lt;CODE&gt;earliest_time&lt;/CODE&gt; to say you want the beginning of the current week minus one day.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo earliest_time=@w-1d
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Mar 2020 21:01:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-showing-data-starting-on-a-Saturday-up-to/m-p/481364#M134897</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-03-02T21:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a search showing data starting on a Saturday up to current day</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-showing-data-starting-on-a-Saturday-up-to/m-p/481365#M134898</link>
      <description>&lt;P&gt;Yes, I like your answer better than mine. Thank you for the quick response&lt;/P&gt;</description>
      <pubDate>Mon, 02 Mar 2020 21:16:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-search-showing-data-starting-on-a-Saturday-up-to/m-p/481365#M134898</guid>
      <dc:creator>SteveBowser</dc:creator>
      <dc:date>2020-03-02T21:16:44Z</dc:date>
    </item>
  </channel>
</rss>

