I was trying to format my date which shows as
Sat Oct 26 2019 16:33:36 GMT+0530 (India Standard Time)
but i wanted to show this as 26/10/2019.
finally found a solution and I’m posting this for everyone who is looking for a solution.
let birthdate = new Date(this.dob).toLocaleDateString('en-GB')
toLocaleDateString(‘en-GB’) method will save your day!
If you want to show month before date as the format mm/dd/yyyy