// DateTime to double and vice versa
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));
}
Saturday, May 30, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment