DateTime to byte[]

M

Marc Gravell

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.FromBinary(...) to
convert to/from a long, and use BitConverter for long to/from byte[] -
would that do?

Marc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top