Azat Azat - 28 days ago 6
Javascript Question

Parse DateTime string in JavaScript

Does anyone know how to parse date string in required format

dd.mm.yyyy
?

Answer Source

See:

Code:

var strDate = "03.09.1979";
var dateParts = strDate.split(".");

var date = new Date(dateParts[2], (dateParts[1] - 1), dateParts[0]);