title: Removing time from datetime in SQL Server
body: <p>I'm currently trying to remove the <code>time</code> from a <code>datetime</code>.</p>
  
  <p>These are the rows in the table</p>
  
  <pre><code>PK_Date
  -----------------------
  2011-07-03 00:00:00.000
  2011-07-04 00:00:00.000
  </code></pre>
  
  <p>My code below works, but doesn't actually work. Meaning it doesn't give me an error, but when I look at the results, its still exactly the same. I want to change every single row in that table to become just date eg. 2011-03-04</p>
  
  <p>Any Ideas? Cheers,</p>
  
  <pre><code> UPDATE dbo.Time 
   SET PK_Date = CONVERT(date,PK_Date,111)  
   FROM dbo.Time
  </code></pre>