DateTime to byte[]

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?Um95?=

    DateTime to byte[]

    How do I convert a DateTime to a byte array? BitConverter does not take a
    DateTime.
  • Marc Gravell

    #2
    Re: DateTime to byte[]

    How do I convert a DateTime to a byte array? BitConverter does not take a
    DateTime.
    Well, you can use when.ToBinary() and when = DateTime.FromBi nary(...) to
    convert to/from a long, and use BitConverter for long to/from byte[] -
    would that do?

    Marc

    Comment

    Working...