Monday, March 8, 2010

Programmer - DateTime to javascript date

Programmer Question

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



Find the answer here

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails