I have a situation where I'm using a timestamp to track updates to a row, but I need to send the timestamp to a client, then when they request the data again the timestamp is included to avoid returning unchanged information.
Now I can take the existing value, and perform something like
BitConverter.ToInt64(data.Timestamp.Reverse().ToArray(), 0)
This gives me the timestamp as a long, but when I want to include that value in a request it's a bit messy having to throw it back and forth into byte arrays.
Is there any built-in functionality for returning timestamp fields as unsigned longs? I'd prefer to avoid having to write and maintain typeconverters in the designer and runtimes.
SQL supports a timestamp column as a number, so you can say
where myTimestamp=0x00000864
or even
where myTimestamp=2054