Open a non SharePoint site console and new Date().toISOString() should work – Danny '365CSI' Engelman Dec 16 '15 at 19:22 So the fix i currently run to make it work with your comp is taking my ISO 8601 String, instantiate a new Date() with that ISO String, then i convert it with .toISOString and then i make it a string with .toStringAnd then passes that string into your component, then it will work. It also serializes the Date object during JSON serialization. Using VB2005 is there any reason to use one of these functions over the other? TAGs: JavaScript Version. Syntax. They are specified relative to it. 41.2.1 Background: UTC vs. Z vs. GMT. Definition and Usage. toString() It returns the date in the form of string. Sample: "2015-04-08T15:48:22.000Z" toUTCString() Returns human readable format in UTC timezone. The .toISOString() function in JS is giving me string like this: 2015-06-14T20:00:00:000Z I need it to be like th... Effie Kemmer posted on 08-12-2020 javascript node.js date format iso @dilijev @obastemur Sorry for the long delay! Output: Output : 1596412800000; The Date.UTC() method in JavaScript is used to return the number of milliseconds in a Date object since January 1, 1970, 00:00:00, universal time. well, I prefer my coding to use the same conversioin method all over the whole project, I mean, I don't like to have two different methods, sometimes is Convert.ToString(X), sometimes is (string), if that's the situation, I prefer to use Convert.ToString(X) solely. Not sure it will help because in that case the exceptions throws inside Date.toJSON, but according to the presented stack trace it should be from inside String.toJSON. Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor. GitHub Gist: instantly share code, notes, and snippets. date.toISOString. Save to Google Drive. toISOString() Returns a string that is ISO-8601 format in UTC timezone. In the