title: Find numbers of weeks in date range(from date-To date) in SQL SERVER
body: <p>I have two dates <code>FromDate</code> and <code>ToDate</code>. Start is always <strong>Monday</strong> and <code>ToDate</code> is always <strong>Friday</strong>.</p>
  
  <ul>
  <li>I want to find number of weeks separately not just count.</li>
  <li>I want to show week1, week2, week3, etc report in given date range. (ie Weekly product counts).</li>
  </ul>
  
  <p>I have tried this :</p>
  
  <pre><code>SELECT * FROM WeekDate
  WHERE DATEDIFF(Week,GETDATE(),'2013-09-20')=0
  </code></pre>
  
  <p>It gives all values not just for week 0.
  Can any one help me about this?</p>
  
  <p>Table structure</p>
  
  <pre><code>CREATE TABLE [dbo].[WeekDate]
  (
      [id] [int] IDENTITY(1,1) NOT NULL,
      [Counter] [int] NULL,
      [CDate] [datetime] NOT NULL
  ) ON [PRIMARY] 
  </code></pre>
  
  <p>and data is </p>
  
  <pre><code>1   1   2013-09-17 00:00:00.000 
  3   2   2013-09-18 00:00:00.000 
  4   6   2013-09-19 00:00:00.000 
  5   2   2013-09-23 00:00:00.000 
  6   3   2013-09-24 00:00:00.000 
  7   4   2013-10-01 00:00:00.000 
  </code></pre>