SQLTeam.com | Weblogs | Forums

Timestamp to datetime varbinary8


#1

Hi.
SELECT CONVERT(datetime, '0x0000E0FF01E0FF01E0FF01E0FF01E0FF0100000000')

Conversion failed when converting datetime from binary/varbinary string.

If i try other timestamp samples it works. Is this a wrong timestamp or I am doing something wrong?
Thanks.


#2

Or this
SELECT CONVERT(datetime, 0x000000001E4CA088)


#3

OK.
This seems to do the trick for binary (not datetime):

convert(varbinary(max), '0x00000000315F2C5A',1)

We are having an issue from the lovely idea of some person to bind them as datetimes.
I can't find a way to convert to datetime so I am comparing binaries now.