title: Find a Date from last year in SQL Server
body: <p>I am using SQL Server 2008 and I am trying to calculate two dates from a year ago. Let’s say if today it is 3/18/13, I need to find 4/1/12 and also find 4/30/12.</p>
  
  <p>I tried the following which gives me 4/18/12, but not sure how to get the desired dates mentioned above. Also, I need to find   5/1/12, 5/31/12…  etc.  Any idea ?  thanks.</p>
  
  <pre><code>DATEADD(MONTH,-11, GETDATE())    -  returns 4/18/12
  </code></pre>
  
  <p>I also tried </p>
  
  <pre><code>DATEADD(YEAR,-1, DATEADD(MONTH,DATEDIFF(MONTH,-11, GETDATE()), 0)) It returns  4/1/12 ,
  DATEADD(YEAR,-1, DATEADD(MONTH,DATEDIFF(MONTH,-10, GETDATE()), 0)) also returns 4/1/12 instead of   5/1/12 
  </code></pre>