Parse DateTime string in JavaScript
问题 Does anyone know how to parse date string in required format dd.mm.yyyy ? 回答1: See: Mozilla Core JavaScript Reference: Date object Mozilla Core JavaScript Reference: String.Split Code: var strDate = "03.09.1979"; var dateParts = strDate.split("."); var date = new Date(dateParts[2], (dateParts[1] - 1), dateParts[0]); 回答2: If you are using jQuery UI, you can format any date with: <html> <body> Your date formated: <span id="date1"></span><br/> </body> </html> var myDate = '30.11.2011'; var