<p>I want to convert a number that is in <a href="https://en.wikipedia.org/wiki/Netscape_Portable_Runtime#Time" rel="nofollow noreferrer">PRTime</a> format (a 64-bit integer representing the number of microseconds since midnight (00:00:00) 1 January 1970 Coordinated Universal Time (UTC)) to a <code>DateTime</code>.</p>
<p>Note that this is slightly different than the usual &quot;number of milliseconds since 1/1/1970&quot;.</p>

[{'answer_id': 56674, 'author': 'Barry', 'author_id': 845, 'author_profile': 'https://Stackoverflow.com/users/845', 'pm_score': 3, 'selected': True, 'text': '<pre><code>Dim prTimeInMillis As UInt64\nprTimeInMillis = prTime/1000\n\nDim prDateTime As New DateTime(1970, 1, 1)\nprDateTime = prDateTime.AddMilliseconds(prTimeInMillis)\n</code></pre>\n'}, {'answer_id': 56753, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': '<p>DateTime has a constructor that takes Ticks (which are 100 nanoseconds).</p>\n<p>So take your prTime, multiply it by 10 and add it to the number of ticks representing the Epoch time and you have your conversion.</p>\n<pre><code>private static DateTime epoch = new DateTime(1970, 1, 1);\n\nprivate static DateTime ConvertPrTime(long time)\n{\n    return new DateTime(epoch.Ticks + (time*10), DateTimeKind.Utc);\n}\n</code></pre>\n'}]
['https://Stackoverflow.com/questions/56638', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1842864/']