title: Round .NET DateTime milliseconds, so it can fit SQL Server milliseconds
body: <p>I want to convert the datetime value to the value that I will get from SQL Server 2008.</p>
  
  <p>SQL Server truncate the milliseconds to 3 digits, so I truncate the milliseconds already. But the problem is that as you can see here: <a href="https://stackoverflow.com/questions/634122/milliseconds-wrong-when-converting-from-xml-to-sql-server-datetime">Milliseconds wrong when converting from XML to SQL Server datetime</a>. SQL Server also has an precision issue. </p>