We have a recordversion column (Something like 0x00000000006EC935) of type timestamp in SQL. Want to have it as a string in c# code. What is equivalent type? How to convert?
You can map Timestamp type in sql to Byte[] in .net.
you can convert string rowVersion to byte[] and vise versa like this:
// string rowVersion To Byte[]
byte[] byt = System.Text.Encoding.UTF8.GetBytes(strOriginal);
// Byte[] rowVersion to string
strModified = Convert.ToBase64String(byt);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With