Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Timestamp to datetime 1

Status
Not open for further replies.

mukund

Programmer
Mar 6, 2001
64
GB
Hi,
Does anybody know how to convert a timestamp column value to a valid datetime value.

Any suggestions/help is welcome

Regards,
Mukund.
 
Sorry to be the bearer of bad news but you can't do what you want. Timestamp columns do not equate to a valid date.

As per BOL:

The SQL Server timestamp data type has nothing to do with times or dates. SQL Server timestamps are binary numbers that indicate the relative sequence in which data modifications took place in a database. The timestamp data type was originally implemented to support the SQL Server recovery algorithms. Every time a page was modified, it was stamped with the current @@DBTS value and @@DBTS was incremented by one. This was sufficient for recovery to determine the relative sequence in which pages had been modified, but the timestamp values had no relationship to time.

Rick.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top