Sometimes it’s necessary to convert Sybase timestamp to something more readable
Warning! Timestamp is not date type!
declare @p timestamp
declare @s varchar(16)
declare @t1, @t2 varbinary(4)
//— from char to timestamp
@t1 = hextoint(substring(lower(@s),1,8))
@t2 = hextoint(substring(lower(@s),9,8))
@p = @t1 + @t2
//— from timestamp to [...]
