Created
February 19, 2015 10:21
-
-
Save weiland/3cf33400095ed9a06d7d to your computer and use it in GitHub Desktop.
Converting a c# Date with Javascript into a Javascript Date Object
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var cSharpDate = '/Date(1424259189000)/'; // if one has to handle with a C# Date String | |
var jsDate = new Date(parseInt(cSharpDate.substr(6))); | |
// will output: Wed Feb 18 2015 12:33:09 GMT+0100 (Mitteleuropäische Zeit) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment