title: Group days by week
body: <p>Is there is a way to group dates by week of month in SQL Server?</p>
  
  <p>For example </p>
  
  <pre><code>Week 2: 05/07/2012 - 05/13/2012
  Week 3: 05/14/2012 - 05/20/2012
  </code></pre>
  
  <p>but with Sql server statement</p>
  
  <p>I tried</p>
  
  <pre><code>SELECT SOMETHING, 
       datediff(wk, convert(varchar(6), getdate(), 112) + '01', getdate()) + 1 AS TIME_
  FROM STATISTICS_
  GROUP BY something, TIME_
  ORDER BY TIME_
  </code></pre>
  
  <p>but it returns the week number of month. (means 3)</p>
  
  <p>How to get the pair of days for current week ?</p>
  
  <p>For example, now we are in third (3rd) week and <strong>I want to show</strong> <code>05/14/2012 - 05/20/2012</code></p>
  
  <p>I solved <strong><em>somehow</em></strong>:</p>
  
  <pre><code>SELECT DATEADD(ww, DATEDIFF(ww,0,&lt;my_column_name&gt;), 0)
  
  select DATEADD(ww, DATEDIFF(ww,0,&lt;my_column_name&gt;), 0)+6
  </code></pre>
  
  <p>Then I will get two days and I will concatenate them later.</p>