title: Query windows event log for the past two weeks
body: <p>I am trying to export a windows event log but limit the exported events not according to number but according to time the event was logged. I am trying to do that on windows 7 and newer. So far my efforts are focused on using wevtutil.</p>
  
  <p>I am using wevtutil and my command line now is: <code>wevtutil Application events.evtx</code> The problem here is that I export the whole log and this can be quite big so I want to limit it just to the last 2 weeks.</p>
  
  <p>I have found <a href="http://www.networksteve.com/windows/topic.php/Wevtutil_command_options_for_Date/?TopicId=47201&amp;Posts=1">this</a> post but first of all it does not seem to produce any output on my system(yes I have changed the dates and time) and second it seems to be dependent on the date format which I try to avoid.</p>
  
  <p>Here is the modified command I ran:</p>
  
  <pre><code>wevtutil qe Application "/q:*[System[TimeCreated[@SystemTime&gt;='2012-10-02T00:00:00' and @SystemTime&lt;'2012-10-17T00:00:00']]]" /f:text
  </code></pre>
  
  <p>I had to replace the <code>&amp;lt;</code> and <code>&amp;gt;</code> with the actual symbols as I got a syntax error otherwise. This command produces empty output.</p>