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;
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment