It seems that the TIMESTAMP information is encrypted in some way, where the date/time data is somehow encoded in binary. I just want to discover all the rows that were modified today.
It seems that the TIMESTAMP information is encrypted in some way, where the date/time
Share
TIMESTAMPis an unfortunate name the SQL Server team gave the data type. It is for concurrency, and has nothing to do with date or time – they’ve recommended using its alias,ROWVERSIONto prevent confusion. From this Books Online article, “In DDL statements, use rowversion instead of timestamp wherever possible.”Unfortunately you won’t be able to derive any date/time details from the
ROWVERSIONcolumn you already have, but if this information is important, you should add CreatedDate / ModifiedDate columns, for example:Then create a
TRIGGERthat fires onUPDATEto keep the ModifiedDate value current. You may need to decide whether you want the ModifiedDate to beNULLor equal to CreatedDate on initialization.