You can use String.slice
.
var dateStr="19/02/2008";
var output = dateStr.slice(0, 6) + dateStr.slice(8);
console.log(output);
5
solved How can I remove the leading two digits from year in Date in javascript?
You can use String.slice
.
var dateStr="19/02/2008";
var output = dateStr.slice(0, 6) + dateStr.slice(8);
console.log(output);
5
solved How can I remove the leading two digits from year in Date in javascript?