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.