我有时间戳并希望将其转换为DateTime。我怎样才能在JS中做到这一点? 即 时间戳 -将时间戳转换为js中的日期时间
要导致的 -
2016-05-30T12:10:30.407 + 05:30
我有时间戳并希望将其转换为DateTime。我怎样才能在JS中做到这一点? 即 时间戳 -将时间戳转换为js中的日期时间
要导致的 -
2016-05-30T12:10:30.407 + 05:30
我想你的时间戳是错误的。这是因为:使用moment.js
`new Date(59080993) //=> Thu Jan 01 1970 18:24:40 GMT+0200`
是的,但仅供参考 –
,可以timesetamp转换为任何给定的格式,VAR时间=力矩(1382086394000).format( “DD-MM-YYYY H:MM:SS”); 将打印18-10-2013 11:53:14; – Sugam
参考[this](http://stackoverflow.com/questions/19485353/function-to-convert-timestamp-to-human-date-in-javascript) –
alert(new Date(1291656749000))。toUTCString() – Sumanta736