0
我正在寻找以毫秒输出日期,但它不工作。使用getTime()的日期(毫秒)
在HTML文件我有:
{{product.date_expiration}}://至极输出==> 2018-01-13T12:22:06.165Z
{{的currentdate}}: //至极输出==> “2017-02-10T13:18:58.339Z”
与:
date_expiration: {type: Date}
和:
{CurrentDate}}: {type: Date}
whene我试图让日期以毫秒为单位:
{{product.date_expiration.getTime()}} ==>不输出任何
和:
{{CurrentDate.getTime()}} ==> output 1486733469830
任何帮助将不胜感激。感谢
date_expiration可能是一个字符串,而不是日期。 –
是否{{produit.date_expiration.getTime()}}是问题中的拼写错误,还是错误原因! –
sory,这是一个错字,后编辑 – Nassim