We Recommend

Accelerated C# 2008 Accelerated C# 2008
This book is both a rapid tutorial and a permanent reference. You’ll quickly master C# syntax while learning how the CLR simplifies many programming tasks. You’ll also learn best practices that ensure your code will be efficient, reusable, and robust. Why spend months or years discovering the best ways to design and code C# when this book will show you how to do things the right way, right from the start?


Posted By

zvasanth on 12/29/07


Tagged

get javascript time java script


Versions (?)


Get Java Script Time


Published in: C# 


URL: ideabubbling.com

drunkenprogrammer


  1. public static string GetJavaScriptTime()
  2. {
  3. Int64 retval = 0;
  4. DateTime st = new DateTime(1970, 1, 1);
  5. TimeSpan t = (DateTime.Now - st);
  6. retval = (Int64)(t.TotalMilliseconds + 0.5);
  7. retval = retval + 1000000;
  8. return retval.ToString();
  9. }

Report this snippet 

You need to login to post a comment.