title: WHERE date BETWEEN (a year ago) AND (now)
body: <p>I'm working on a query where I need to pull all results where the date is between now and a year ago. So if the query is run tomorrow, the results are going to be a little bit different than they were if it was run today. If I run it today, it would basically be like saying "where the date is between 6/1/2015 and 6/1/2016." Tomorrow, between 6/2/2015 and 6/2/2016, and so on.</p>
  
  <p>I figured I could format it just the same as a regular <code>WHERE</code> clause involving dates. This is what I have:</p>
  
  <pre><code>WHERE CreateDate BETWEEN (DATEADD(Year,-1,GETDATE()) AND (GetDATE())
  </code></pre>
  
  <p>First, I'm not sure if the <code>DATEADD()</code> part is what I should use -- I just tried it based on what I was reading on another forum. Second, I've got a red squiggly telling me I've got a syntax error near <code>AND</code>.</p>
  
  <p>What's the best way to go about this?</p>