SQL Server Extended Events can include an action of mdmtargetpkg.mdmget_TimeStampUTC. It returns a value such as 132085458320550473. How can that be converted to an actual date?
It doesn't appear to be a valid unix timestamp, even using microseconds.
Maybe it's the TimeStamp is actually RowVersion issue– but this explicitly has "UTC" in it, implying it's a real time.
@@VERSION
:
Microsoft SQL Azure (RTM) - 12.0.2000.8
Jul 3 2019 10:02:53
Copyright (C) 2019 Microsoft Corporation
Best Answer
The value 132085458320550473 is the number of ticks since January 1, 1601. Use the below function to convert it to datetime: