I want to iterate time in my FormArray and I'm receiving time from API in the below format:
14.21.00
I want to format this time like this:
2:21 PM
I'm trying to format using Angular DatePipe like this:
{{summon.value.summonTime | date :'shortTime' }}
but got error:
Error: InvalidPipeArgument: 'Unable to convert "14.21.00" into a date' for pipe 'DatePipe'
here I reproduced in stackblitz
based on my research, 14.21.00 are not supported time format in javascript/typescript, if there any guidance and suggestion to solve this.
{{summon.value.summonTime.split('.').join(':')}}DatePIpe