From the back-end, I am retrieving this string as a date: "2017-08-16T18:35:41.611Z2017-08-16T13:35:41.611"
How can I extract the total number of minutes from this string? I tried the following:
let date = new Date("2017-08-16T18:35:41.611Z2017-08-16T13:35:41.611");
let minutes = date.getMinutes();
console.log(minutes);
But date
logs as Invalid Date
and minutes
logs as NaN
. Any ideas?