res.SentTime.substring(6,19)
“1318319100000”
var date = new Date();
date.setTime(res.SentTime.substring(6,19));
1318319100000
为什么不解析日期字符串?
答案 0 :(得分:3)
将时间戳乘以1000
。你会得到mili秒。将它传递给JS中的Date
构造函数。
在你的代码中执行此操作,
var date = new Date(parseInt(res.SentTime.substring(6,19),10)*1000);