I have a html table. One column contains date values. I want to extract month
of those dates
and print it in the console. Date format is yyyy-MM-dd. Here is my code:
var myTable = document.getElementById('openDispatchNoteTable');
for (var i = 0 ; i < myTable.rows.length ; i++) {
console.log("date : " + myTable.rows[i].cells[6].innerText);
}
myTable.rows[i].cells[6].innerText
gives 2018-November-14
as the output.
Can you please help me to solve this problem?