Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript new date dd/mm/yyyy

var dateString = "23/10/2015"; // Oct 23

var dateParts = dateString.split("/");

// month is 0-based, that's why we need dataParts[1] - 1
var dateObject = new Date(+dateParts[2], dateParts[1] - 1, +dateParts[0]); 

console.log(dateObject); // Fri Oct 23 2015 00:00:00
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #date
ADD COMMENT
Topic
Name
3+2 =