1

Is there some way to get Base64String from timestamp? For example:

0x000000005E683A8A -> AAAAAF5oOoo=

I need it to debug my project. Or how can I save timestamp value in C# without Convert.ToBase64String in this view:

0x000000005E683A8A

And then will send it to sql again?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Andrei Barbolin
  • 395
  • 1
  • 3
  • 13
  • Is your question how to convert to and from base64 in C# or in T-SQL? That is documented on the web. – usr Jul 12 '16 at 14:53
  • No, I can convert timestamp to and from base64 when I get it from sql as array of bytes. But for example I got one of timestamps from query and saved it as Base64String in my code. Then for testing I need to change this value from another query which I run by myself in management studio. And I can't do it because I can't convert tsql timestamp to base64string by myself. Changing query and running code with a new query is not so useful. – Andrei Barbolin Jul 12 '16 at 15:01
  • Why can't you convert the timestamp to base64? You stated that you know how to convert between bytes and base64. – usr Jul 12 '16 at 15:09
  • I'm bad in explanation maybe =) This answer is useful for me: http://stackoverflow.com/questions/321370/how-can-i-convert-a-hex-string-to-a-byte-array – Andrei Barbolin Jul 12 '16 at 15:12

0 Answers0