<?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: Using non timestamp field to produce search for yesterday in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Using-non-timestamp-field-to-produce-search-for-yesterday/m-p/304860#M164767</link>
    <description>&lt;P&gt;Try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo sourcetype=bar... (your base search)...   [| gentimes start=-1 | eval "Closed date"=strftime(relative_time(now(),"-1d@d"),"%Y/%m/%d") | table "Closed date" ]
|...rest of the search   
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The subsearch would return yesterday's date in same format as field "Closed date" to filter records. Please ensure that the time range (which only works on _time) is selected in way that it includes all the data that may have "Closed date" of yesterday.&lt;/P&gt;</description>
    <pubDate>Mon, 27 Nov 2017 16:04:48 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2017-11-27T16:04:48Z</dc:date>
    <item>
      <title>Using non timestamp field to produce search for yesterday</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-non-timestamp-field-to-produce-search-for-yesterday/m-p/304859#M164766</link>
      <description>&lt;P&gt;I have a date field called "Closed date" in following format "%Y/%m/%d" that IS NOT my timestamp field &amp;amp; want to create a daily scheduled report that only returns data for "Closed date"=previous day. I've tried a eventstats max(closed date) formula but this trips up as on a rare occasion there will be a close date of today. &lt;/P&gt;

&lt;P&gt;Any suggestions??&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2017 15:58:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-non-timestamp-field-to-produce-search-for-yesterday/m-p/304859#M164766</guid>
      <dc:creator>jackreeves</dc:creator>
      <dc:date>2017-11-27T15:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: Using non timestamp field to produce search for yesterday</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-non-timestamp-field-to-produce-search-for-yesterday/m-p/304860#M164767</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo sourcetype=bar... (your base search)...   [| gentimes start=-1 | eval "Closed date"=strftime(relative_time(now(),"-1d@d"),"%Y/%m/%d") | table "Closed date" ]
|...rest of the search   
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The subsearch would return yesterday's date in same format as field "Closed date" to filter records. Please ensure that the time range (which only works on _time) is selected in way that it includes all the data that may have "Closed date" of yesterday.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2017 16:04:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-non-timestamp-field-to-produce-search-for-yesterday/m-p/304860#M164767</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-11-27T16:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: Using non timestamp field to produce search for yesterday</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-non-timestamp-field-to-produce-search-for-yesterday/m-p/304861#M164768</link>
      <description>&lt;P&gt;That has worked like a charm! Thank you so much. I've never come across the gentimes function before&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2017 16:17:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-non-timestamp-field-to-produce-search-for-yesterday/m-p/304861#M164768</guid>
      <dc:creator>jackreeves</dc:creator>
      <dc:date>2017-11-27T16:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: Using non timestamp field to produce search for yesterday</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-non-timestamp-field-to-produce-search-for-yesterday/m-p/304862#M164769</link>
      <description>&lt;P&gt;I'm using gentimes command to just generate a single row where I can set "Closed date" and return it's value. A more appropriate command for this, for version 6.3+, is &lt;CODE&gt;| makeresults&lt;/CODE&gt;.  (Replacing &lt;CODE&gt;| gentimes start=-1&lt;/CODE&gt; with &lt;CODE&gt;|makeresults&lt;/CODE&gt; in above search).&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2017 16:30:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-non-timestamp-field-to-produce-search-for-yesterday/m-p/304862#M164769</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-11-27T16:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: Using non timestamp field to produce search for yesterday</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-non-timestamp-field-to-produce-search-for-yesterday/m-p/304863#M164770</link>
      <description>&lt;P&gt;Thanks, updated search accordingly. Is there any documentation on these functions, would like to understand more?&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2017 16:38:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-non-timestamp-field-to-produce-search-for-yesterday/m-p/304863#M164770</guid>
      <dc:creator>jackreeves</dc:creator>
      <dc:date>2017-11-27T16:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: Using non timestamp field to produce search for yesterday</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Using-non-timestamp-field-to-produce-search-for-yesterday/m-p/304864#M164771</link>
      <description>&lt;P&gt;Absolutely. Here is the documentation for makeresults specifically. You can find all other search command in the left side tree view.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.0.0/SearchReference/Makeresults"&gt;https://docs.splunk.com/Documentation/Splunk/7.0.0/SearchReference/Makeresults&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2017 16:49:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Using-non-timestamp-field-to-produce-search-for-yesterday/m-p/304864#M164771</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-11-27T16:49:11Z</dc:date>
    </item>
  </channel>
</rss>

