Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

date().toisostring().slice(0 10) giving wrong result

//Add Z in the end for getting the correct value with local timezone
var a = new Date("June 08, 2018 Z");
var res = a.toISOString().slice(0, 10);
console.log(res);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #giving #wrong #result
ADD COMMENT
Topic
Name
9+3 =