I found a web page with a solution which appears to work, although you may have to re-examine the value you posted. I had to drop 3 zeroes from the end of the string of numbers to get something in range for SQL Server. Here's the code:
SELECT T.binary_value
, D.DATE_VALUE
, DO.DATE_CONVERTED
FROM (
VALUES (127777589408075800)
) AS T(binary_value)
CROSS APPLY (
SELECT (CAST(T.binary_value AS bigint) / (864000000000.0)) - 109207 AS DATE_VALUE
) AS D
CROSS APPLY (
SELECT DATEADD(minute, DATEDIFF(minute, GETUTCDATE(), GETDATE()), D.DATE_VALUE) AS DATE_CONVERTED
) AS DO
Be aware that just dropping 2 zeroes from that value put it in the date range of year 5650. Not exactly a realistic date value to appear in Active Directory, much less SQL Server. The web page I found is here:
Steve (aka sgmunson) 🙂 🙂 🙂
Rent Servers for Income (picks and shovels strategy)