I am looking to convert date format from yyyy-MM-dd'T'HH:mm:ss.SSS'Z' to dd-mmm-yyyy when the dates are retrieved from a JSON object. Currently, I am utilizing the ng-csv plugin to download this JSON data, which is working properly. However, I need to implement a JavaScript function to handle the date format conversion. Below is an example of the JSON structure:
[{
"Dates": "2016-09-27T18:30:00.000Z",
"ABC": 40,
"PQR": 1,
"XYZ": 18
}, {
"Dates": "2016-10-02T18:30:00.000Z",
"ABC": 43,
"PQR": 11,
"XYZ": 8
}, {
"Dates": "2016-10-03T18:30:00.000Z",
"ABC": 6,
"PQR": 76,
"XYZ": 34
}]
Does anyone have any suggestions on how to achieve this conversion? Thank you in advance.