title: SQL Server CE: Update statement using DateTime in Where clause
body: <p>I need to be able to update time information for a row in the table. The id is not unique so I also use the <code>startTime</code> column to find the specific row. I am using SQL Server CE and C# so the date objects are a <code>DateTime</code> object in C#.</p>
  
  <p>Is there another way to optimise this? I can't seem to be getting a match with the <code>WHERE</code> clause and the <code>startTime</code>? <code>startTime</code> is a <code>datetime</code> datatype in SQL Server CE.</p>
  
  <pre><code>UPDATE tablename
  SET endTime = '14/04/2012 9:42:58 PM', duration = '0.052003'
  WHERE (startTime = CONVERT(DATETIME, '2012-04-14 21:42:58.000', 120)) AND (id= '14363204')
  </code></pre>