【发布时间】:2016-10-07 08:36:44
【问题描述】:
我有时间戳,想将其转换为 DateTime。我怎样才能在 JS 中做到这一点? IE。 时间戳 -
59080993
希望结果为 -
2016-05-30T12:10:30.407+05:30
【问题讨论】:
-
使用moment.js,您可以将timesetamp转换为任何给定的格式, var time = moment(1382086394000).format("DD-MM-YYYY h:mm:ss");将打印 18-10-2013 11:53:14;
-
参考this
-
警报(新日期(1291656749000)).toUTCString()
标签: javascript angularjs