convert time stamp to Date inside angular expression like {{new Date(timestamp)}}

后端 未结 6 1666
旧时难觅i
旧时难觅i 2021-02-05 11:49

Today I found that\'s it\'s not working to convert for a date inside angular expression.

So I just making something like

{{new Date(elem.times         


        
6条回答
  •  悲哀的现实
    2021-02-05 12:02

    Just an extention of what @package mentioned we can also go to hour-second as well from millisecond, the format can be any pattern as well

    < th >{{elem.timestamp | date: 'yyyy/MM/dd h:mm:ss a'}}< /th >
    

提交回复
热议问题