I am using angular JS, my Server returning a date like below. When I tried to convert it to Date format it is saying "Invalid Date". Please any suggestions? Below is the sample of server date.
function runSettlement() {
return Restangular.one('/api/GetdateofLastrun').get().then(function
(data) {
var serverDate = new Date(data);
Console.log(data); //Invalid Date
}
Here the API call returns below data from server. 21-04-2017 20:34:30 UTC +05:30