Answers for "convert 8-aug-2021 to date javascript"

0

convert 8-aug-2021 to date javascript

var parts ='2014-04-03'.split('-');
// Please pay attention to the month (parts[1]); JavaScript counts months from 0:
// January - 0, February - 1, etc.
var mydate = new Date(parts[0], parts[1] - 1, parts[2]); 
console.log(mydate.toDateString());
Posted by: Guest on June-15-2021

Code answers related to "convert 8-aug-2021 to date javascript"

Browse Popular Code Answers by Language