When attempting to format a date in a specific way using the pipe date, I encountered an error:
Uncaught Error: InvalidPipeArgument: 'Unable to convert "25/01/2019" into a date' for pipe 'e'
at Xe (main.fc4242d58c261cf678ad.js:1)
at e.transform (main.fc4242d58c261cf678ad.js:1)
at main.fc4242d58c261cf678ad.js:1
at main.fc4242d58c261cf678ad.js:1
at es (main.fc4242d58c261cf678ad.js:1)
at Cs (main.fc4242d58c261cf678ad.js:1)
at Object.updateRenderer (2.afd83a5d88a3f927f011.js:1)
at Object.updateRenderer (main.fc4242d58c261cf678ad.js:1)
at $a (main.fc4242d58c261cf678ad.js:1)
at us (main.fc4242d58c261cf678ad.js:1)
The date information was retrieved from the API as a string
with the value of "25/01/2019," and I attempted to display it in HTML using the following code:
{{ item.date | date: 'dd MMM yyyy' }}
I am unsure if I have made an error. My intention is to present the date in a different format, considering that the input date is a string type.
Is there a solution for this issue? If so, how can I achieve my goal in this scenario? Your help is greatly appreciated.