I have a value
20 01 01 29 13 11 58 15 46 52 00 00 00
which got migrated to a SQL Server table of column type binary
as 0x20010129131158154652000000
. If we observe it is exact value just prefixed with 0x
, which is fine.
Now, when I am trying to insert a value which should be current date and time with 6 precision millisecond it is converting to a hexadecimal value like 0x00000000000000A87200F31D11
.
Please help me find a solution which should give the same time stamp value just by prefixing 0x
even the SQL Server table column type is binary. That is if am passing the value as 2018-01-24 15:08:59.780
, it should insert into SQL Server table of column type binary(13)
as 0x20180124150859780