public static double ToDouble(DateTime what) { return BitConverter.ToDouble(BitConverter.GetBytes(what.Ticks), 0); } public static DateTime ToDateTime(double what) { return new DateTime(BitConverter.ToInt64(BitConverter.GetBytes(what), 0)); }
You need to create an account or log in to post comments to this site.