title: SQL Server 2005: how to subtract 6 month
body: <p>I have a date, suppose today date </p>
  
  <pre><code>declare @d datetime
  set @d = '20101014'
  </code></pre>
  
  <p>I need </p>
  
  <pre><code>select @d - &lt;six month&gt;
  </code></pre>
  
  <p>where  is the real number of days that contains last six month, beginning from @d.</p>