I would like to get the sql query to convert varbinary to datetime.
Here is the value in Varbinary(112) :
0x20202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020323939343730
The expected result should be - 1970-05-29 00:00:00.000
Can you please let me know how to get the above result?
unfortunately that was an issue from the vendor. They initially said that it is a date field and that was the reason I was trying to convert it to date format.
But later after several discussions we had to do the following to resolve it.
And then the vendor said for their software the dates will be calculated by subtracting the above result with 999999 which will result in YYMMDD date format
i.e. 999999 - 299470 = 700529 (so this result is in the for of YYDDMM format)