SQL Interview: 107 Timestamp data type and time

SQL Interview: 107 Timestamp data type and time

This is a post in the SQL Interview series. These aren’t trick or gotcha questions, they’re just questions designed to scope out a candidate’s knowledge around SQL Server and Azure SQL Database.

Section: Development Level: Intro

Question:

You are reviewing the design of a database and note that in the dbo.Customers table, there is a column called CustomerTimestamp that has the timestamp data type.

Can you extract the date from the CustomerTimestamp column by using the CONVERT function?

Answer:

No — you cannot extract a date from a timestamp column using CONVERT, because timestamp in SQL Server does not store a date/time.

In SQL Server, the timestamp data type is not a datetime.

It’s an automatically generated, unique binary(8) value that SQL Server updates whenever the row changes. It’s basically a row change counter/version marker and has nothing to do with wall-clock time.

In fact, timestamp is deprecated and its real name now is rowversion.

2026-01-08