Advertisement
kijato

OLETIME to DateTime

Feb 22nd, 2025
333
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.31 KB | Source Code | 0 0
  1. using System;
  2.  
  3. class Program
  4. {
  5.     static void Main()
  6.     {
  7.         byte[] bytes = new byte[] { 190, 110, 116, 207, 178, 140, 229, 64 };
  8.         long l = BitConverter.ToInt64(bytes, 0);
  9.         DateTime dt = DateTime.FromOADate(BitConverter.Int64BitsToDouble(l));
  10.         Console.WriteLine(dt);
  11.     }
  12.    
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement