title: Daily/Weekly/Monthly Record Count Search via StoredProcedure
body: <p>Using <strong>MS SQL Server</strong>.I have made a Stored Procedure named <code>SP_Get_CallsLogged</code>.</p>
  
  <p>I have a table named <code>TRN_Call</code>, and it has one column named <code>CallTime</code> which is a DateTime.</p>
  
  <p>I have a web-page in my application where the User enters:-</p>
  
  <ol>
  <li><p><strong>StartDate</strong> (DateTime)</p></li>
  <li><p><strong>EndDate</strong> (DateTime)</p></li>
  <li><p><strong>Period</strong> (Daily/Weekly/Monthly) (varchar) (from DropDownList)</p></li>
  </ol>
  
  <p>I want to get the <strong>Record Count</strong> of those calls in my table <code>TRN_Call</code> on the basis of the specified Period(Daily/Weekly/Monthly) selected by user in the DropDownList.</p>
  
  <p>e.g.</p>
  
  <pre><code>StartDate ='1/18/2010 11:10:46 AM'
  EndDate   ='1/25/2010 01:10:46 AM'
  Period    =Daily
  </code></pre>
  
  <p>So the record count between these above mentioned dates(StartDate+EndDate) should come in a manner so that I can refer to those counts separately i.e. the following:-</p>
  
  <pre><code>Date 1/18/2010 Records Found 5
  Date 1/19/2010 Records Found 50
  Date 1/20/2010 Records Found 15
  Date 1/21/2010 Records Found 32
  Date 1/22/2010 Records Found 12
  Date 1/23/2010 Records Found 15
  Date 1/24/2010 Records Found 17
  Date 1/25/2010 Records Found 32
  </code></pre>
  
  <p>and send those counts to the Web Application so that these counts could be listed then in the Crystal Reports.</p>