DateTime to javascript date

Posted by AJ on Stack Overflow See other posts from Stack Overflow or by AJ
Published on 2010-03-08T19:50:54Z Indexed on 2010/03/08 20:06 UTC
Read the original article Hit count: 448

Filed under:
|
|

Hello,

From another answer on Stackoverflow is a conversion from Javascript date to .net DateTime:

long msSinceEpoch = 1260402952906; // Value from Date.getTime() in JavaScript
return new DateTime(1970, 1, 1) + new TimeSpan(msSinceEpoch * 10000);

But how to do the reverse? DateTime to Javascript Date ?

Thanks,

AJ

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about .NET