DateTime dt = (DateTime)Value; TimeSpan ts = dt.Subtract(new DateTime(1, 1, 1)); int IntDate = ts.Days + 1721426; int IntTime = (int)(ts.TotalMilliseconds - (ts.Days * (TimeSpan.TicksPerDay / 10000))); BitConverter.GetBytes(IntDate).CopyTo(Data, 0); BitConverter.GetBytes(IntTime).CopyTo(Data, 4);