Within my .ts file, I have a string that looks like this:
const date = "5/03/2018";
I am looking to convert it into the default date format returned by Angular's Date class:
Tue Apr 03 2018 20:20:12 GMT+0530 (India Standard Time)
I attempted to do this using the following code:
const date1 = new Date("5/03/2018");
Unfortunately, the above approach did not yield the desired format. Any suggestions or help would be greatly appreciated. You can access the StackBlitz link for reference: https://stackblitz.com/edit/angular-gdwku3