I have a date which is like this "19/05/2020"
. I am trying to convert it into "yyyy-MM-dd"
format using pipe. So the date should be look like "2020-05-19"
.
this._datePipe.transform("19/05/2020", 'yyyy-MM-dd');
It is giving me an error saying Unable to convert "19/04/2020" into a date' for pipe 'DatePipe
Also tried converting the string to date but again invalid date message is getting display.
Is there any way so that we can convert this date that is "19/05/2020" to a valid one so that we can perform datepipe on it.