title: How can I truncate a datetime in SQL Server?
body: <p>What's the best way to truncate a datetime value (as to remove hours minutes and seconds) in SQL Server 2008?</p>
  
  <p>For example:</p>
  
  <pre><code>declare @SomeDate datetime = '2009-05-28 16:30:22'
  select trunc_date(@SomeDate)
  
  -----------------------
  2009-05-28 00:00:00.000
  </code></pre>