I am trying to format a date that is being requested from my database. I looked up how to format date and I got this as a solution:
var d = new Date("2015/03/25");
Which would work, but my date is stored in a data object and it's a different date for every row (since the data from the DB is being displayed in a table.
let DateSubmitted = new Date(**data[i].DateSubmitted)**;
list += `
<tr>
<td class="requestID">${data[i].requestID}</td>
<td class="date-requested">**${DateSubmitted}**</td>
<td class="item-code">${data[i].itemCode}</td>
...
My question is, how do I format each date returned from data[i]?
Thanks!