title: How to cast datetime into date in SQL Server 2005
body: <p>I have used something like this:</p>
  
  <pre><code> select* from table where cast(CreatedDate as date) = cast(GETDATE() as DATE)
  </code></pre>
  
  <p>in SQL Server 2008R2 and it works perfectly. But when goes to 2005, it doesn't work because Date is not a defined system type. Can anyone let me know a way that works both 2005 and 2008R2?</p>
  
  <p>The CreatedDate is default as current_timestamp and I want to get data with today's data only.</p>