title: inserting Datetime into SQLCE with milliseconds C#
body: <p>I have a string datetime in this format "dd-MM-yyyy HH:mm:ss.fff" </p>
  
  <p>like so..</p>
  
  <pre><code>DateTime mydate = Convert.ToDateTime("13-09-2010 02:30:14.905"); 
   result.SetValue(1, mydate);
  </code></pre>
  
  <p>//I get a error saying 'String was not recognized as a valid DateTime'</p>
  
  <p>if i do it this way </p>
  
  <pre><code>DateTime mydate = DateTime.ParseExact("13-09-2010 02:30:14.905", "dd-MM-yyyy HH:mm:ss.fff", CultureInfo.CurrentCulture);
   result.SetValue(1, mydate);
  </code></pre>
  
  <p>it works fine but formats it without the milliseconds.</p>
  
  <p>i just need the datetime object to hold my formatted time so i can insert it. </p>