this.convertJSON_DateTimeTo_datetimeObj = function (jsonDate) {
var date_dd_MM_yyyy = $filter('date')(jsonDate.slice(6, -2), 'medium');
//var dt = new Date(date_dd_MM_yyyy).toLocaleString("en-US", { timeZone: "Asia/Kolkata" });
//var dt = new Date(date_dd_MM_yyyy.split("/").reverse().join("/"));
return date_dd_MM_yyyy;
},
Input Parameter jsonDate = "/Date(1629810881857)/"
In the above code snippet, I am trying to convert a JSON DateTime into a DateTime Object with the output timezone set to "Asia/Kolkata". The code in the comment section shows what I have already attempted. Any help on this matter would be greatly appreciated. Thank you.