tags:

views:

227

answers:

1

I have a timestamp column (updated) in my Microsoft Sql Server Database and wish to retrieve the value as a DateTime object using SqlConnection and SqlCommand.

What is the easiest way to do this?

+5  A: 

A timestamp field in a SQL Server database is not related to the date and time, but is merely a sequence number.

A timestamp in MySql is on the other hand a datetime-value.

Erik
Could be usefull then with a solution on how to change the MSSQL DB to cope with timestamps like MsSQL
Tim
You define your own DATETIME-field, and remember to update this field whenever you change the content of the row. This is done automatically with MSSQL timestamp field.
Erik