title: Splunk Log - Date comparison
body: <p>I have configured my application logs over splunk and want to do the following -</p>
  
  <ol>
  <li>Get events when the string has today's date</li>
  <li>Get events when the string has tomorrow's date.</li>
  </ol>
  
  <p>I have tried to write a query as below for #1, but it doesn't seem to return anything</p>
  
  <pre><code>REGAVAIL | eval Date=strftime(strptime(Date, "%m%d%Y"), "%m%d%Y") | where Date&gt;= strftime(now(), "%m%d%Y")
  </code></pre>
  
  <p>My search string is REGAVAIL and all events are in the below format -</p>
  
  <p>REGAVAIL|00958645030|8871|1|61745|01262017|0|N|N|Y|N|Y|N|N|O|O|O|O|O|O|O|1013|F
  REGAVAIL|00958647200|8871|1|61745|01282017|0|N|N|Y|N|Y|N|N|O|O|O|O|O|O|O|1013|F
  REGAVAIL|00958649200|8871|1|61745|01292017|0|N|N|Y|N|Y|N|N|O|O|O|O|O|O|O|1013|F</p>
  
  <p>I want to first extract date from it - 01262017and then compare it with today's date. If the match is found, that event should be considered.</p>
  
  <p><a href="https://i.stack.imgur.com/4CxPP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4CxPP.png" alt="enter image description here"></a></p>
  
  <p>Any help would be appreciated! </p>