title: SQL Server query to Crystal Reports
body: <p>I am trying to move reports that currently run in SQL Server to Crystal Reports.</p>
  
  <p>Essentially the statement I want to reproduce is: </p>
  
  <pre><code>SELECT DATEPART(DD,DATE), COUNT(*) 
  WHERE FOO = 'BAR' 
  GROUP BY DATEPART(DD,DATE)
  </code></pre>
  
  <p>Count the occurrence of records that match a criteria, grouped by date.</p>
  
  <p>I have used the Selection Expert to generate a equivalence relation (to evaluate the records) and would like to use the datepart function in a group by statement. I have gotten the GROUP BY selection expert to group by date - but it is the full timestamp (SS:HH:DD:MM) not by specific day i.e. March 1 2010. </p>
  
  <p>I am sure there is a way to achieve what I want but have yet to find a tutorial explaining this scenario.</p>
  
  <p>Any help you could lend would be appreciated</p>