Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

split date using javascript

var date = "28st December,2016";

var date_split1 = date.split(' ');
var date_split2 = date_split1[1].split(',');

console.log('date: ', date_split1[0]);
console.log('month: ', date_split2[0]);
console.log('year: ', date_split2[1]);
 
PREVIOUS NEXT
Tagged: #split #date #javascript
ADD COMMENT
Topic
Name
2+3 =