Add cast function from Varbinary to date/time/timestamp