I need to convert 8 bytes from a hexadecimal value to a new datetime in C#. The function should do the same as it does in SQL Server.
I have the hexadecimal value as a string "0000AC0500000000" or a list of bytes:
["0", "0", "172", "5", "0", "0", "0", " 0 ",]
From that I need to obtain the date "2020-07-27 00:00:00:000". The convert of the SQL Server works perfectly to recover up to milliseconds with only 8 bytes. As shown convert function in SQL Server