Hi,
If you are working in ASP.NET then you can use TimeSpan (which provide the best resolution )like follows:
DateTime moment1 = DateTime.Now;
DateTime moment2 = new DateTime(2003,10,10,19,26,49,300);
TimeSpan ts = moment1 - moment2;
TextBox1.Text = "" + ts.TotalMilliseconds;
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.