Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

date split in 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: #date #split #javascript
ADD COMMENT
Topic
Name
3+8 =