Search This Blog

Thursday, March 6, 2014

C# DateTime to Milliseconds Conversion


double milliseconds=0;
milliseconds = [YourDate].ToUniversalTime().Subtract(new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)).TotalMilliseconds;

No comments:

Post a Comment