C# Programming
05-18-2013, 12:21 AM
How can I read a the value of a column datatype Timestamp in my c# code?
I know that the timestamp is not a datetime in sql server.
I just want to read this to a byte array.
My code so far:
I have tried 3 variations and none of them even compile.
//does not compile var myTimestamp = (byte)dr["TimeStamp"].ToString();//does not compilevar myTimestamp = dr["TimeStamp"].ToString() as byte[];//does not compilevar myTimestamp = dr["TimeStamp"].ToString();
I have googled and am unable to find it.
Pendin Approval
I know that the timestamp is not a datetime in sql server.
I just want to read this to a byte array.
My code so far:
I have tried 3 variations and none of them even compile.
//does not compile var myTimestamp = (byte)dr["TimeStamp"].ToString();//does not compilevar myTimestamp = dr["TimeStamp"].ToString() as byte[];//does not compilevar myTimestamp = dr["TimeStamp"].ToString();
I have googled and am unable to find it.
Pendin Approval