title: Convert DateTime.Ticks to MySQL DateTime in query
body: <p>I have a integer column in MySql storing the DateTime.Ticks.</p>
  <blockquote>
  <p>A single tick represents one hundred nanoseconds or one ten-millionth of a second. There are 10,000 ticks in a millisecond.</p>
  <p>The value of this property represents the number of 100-nanosecond intervals that have elapsed since 12:00:00 midnight, January 1, 0001</p>
  </blockquote>
  <p>How can I convert this to a DateTime in a query? I've tried many things, but cannot get it to work.</p>
  <p>For the ticks 634128921500016150 I hope to get the mysql datetime '2010-06-23 12:06:50'</p>
  <p>I would have believed the following should work, but it gives '4009-06-22 12:15:50.001600'. It seems it's off by 2001 years, 1 day and 9 minutes... If the years and days is consistent, I can just fix it manually, but the minutes seems a little odd.</p>
  <pre><code>SELECT DATE_ADD('0000-01-01 00:00:00',
    INTERVAL 634128921500016150/10000000 SECOND_MICROSECOND);
  </code></pre>
  <p>I've tried adding more zeros, but it never matches :|</p>
  <p>I also tried Jon Skeet's suggestion, but it gives nearly the same result (some fraction of a second different)</p>