title: How Can I Perform Date Comparisons in Access 2013 Query Criteria?
body: <p>I have a date field in my table, and I'm writing a query in Access 2013 to select all items where the date is between 7-days-ago and 30-days-in-the-future.</p>
  
  <p>Currently, I've added the following as "criteria" under the date field:</p>
  
  <pre><code>&gt;=Today()-7 And &lt;=Today()+30
  </code></pre>
  
  <p>But I get the following error when I try to save the query:</p>
  
  <p><img src="https://i.imgur.com/4s4UBNo.png" /></p>
  
  <p>I've tried using DateDiff (as I have in other scenarios) but it tells me that I'm not allowed to use that type of expression as criteria.</p>
  
  <p><strong>EDIT:</strong> This is an Access 2013 custom web app for SharePoint 2013, and all the available functions and syntaxes appear to be different from those available in a desktop database file.</p>