public static DateTime CovertToLocalDateTime(long value)
{
DateTime local = new DateTime();
try
{
long ticks = value * TimeSpan.TicksPerMillisecond;
DateTime utc = new DateTime(1970, 1, 1);
DateTime dotnetEquivalent = utc.Add(new TimeSpan(ticks));
local = dotnetEquivalent.ToLocalTime();
}
catch (Exception ex)
{ }
return local;
}
Friday, April 25, 2008
Subscribe to:
Posts (Atom)