title: Having trouble with inserting date in to database
body: <p>I’m having trouble inserting into a <code>MySQL</code> data table, using <code>C#</code> &amp; <code>ODBC</code> 5.1. The insert fails when it attempts to write into a <code>DateTime</code> field. <code>MySQL</code> says that the <code>DateTime</code> value is not in the correct format. It says that the value I’m inserting is: </p>
  
  <pre><code>13-07-2012 13:46:21.000031000. 
  </code></pre>
  
  <p>As you can see, there’s a bunch of decimal digits for the seconds. I can’t work out why these are being added. If I insert a row manually (e.g. using MySQL Workbench), and supply a value like:</p>
  
  <pre><code>13-07-2012 13:46:21
  </code></pre>
  
  <p><code>MySQL</code> doesn’t seem to add a decimal &amp; the insert completes successfully. As far as I can see, the <code>DateTime</code> from <code>C#</code> to the <code>ODBC</code> Parameter doesn’t contain these decimals, so it seems that something in <code>MySQL</code> at some point is adding them!</p>