How to

get DateTime from binary

Published: 24. October 2011 | Updated: 26. October 2011
License: Microsoft Public License (MS-PL)
Categories: Converting » DateTime
Tags: C# Conversion DateTime Serialization
Was this snippet helpful for you? YESYES / NONO
long binaryDateTime = 5245997402982387904;
DateTime dateTime = DateTime.FromBinary(binaryDateTime);

Console.WriteLine(dateTime);
Console Output:
2011-01-20 4:40:55 PM
Send us feedback about this snippet »



Related Snippets: