title: I want to get the sunday WeekNo?
body: <p>I'm using SQL Server 2008 R2. I need to get the Sunday weekno and I already have the query but it shows the wrong data. What can I do ?</p>
  
  <p>It shows 2 instead of 1. For example, 06-Jan-2013(WeekNo - 1)</p>
  
  <p>My query is </p>
  
  <pre><code>SELECT DATEPART (week, '01-13-2013 23:59:59.000' ) As WeekNo1 ,  
    DATEPART (week, '01-06-2013 23:59:59.000' ) As WeekNo2 ,  
    DATEPART (week, '12-30-2012 23:59:59.000' ) As WeekNo3 ,  
    DATEPART (week, '12-23-2012 23:59:59.000' ) As WeekNo4 ,  
    DATEPART (week, '12-16-2012 23:59:59.000' ) As WeekNo5 ,  
    DATEPART (week, '12-09-2012 23:59:59.000' ) As WeekNo6 
  </code></pre>