码迷,mamicode.com
首页 > Web开发 > 详细

时间js转换方法Date("149...") 转成 2016-7-12 21:23:34 009

时间:2016-07-12 23:02:48      阅读:227      评论:0      收藏:0      [点我收藏+]

标签:

 function timeFormatter(value) {
    var da = new Date(parseInt(value.replace("/Date(", "").replace(")/" , "").split( "+")[0]));
    return da.getFullYear() + "-" + (da.getMonth() + 1) + "-" + da.getDate();
//     + " " + da.getHours() + ":" + da.getMinutes() + ":" + da.getSeconds();
}

时间js转换方法Date("149...") 转成 2016-7-12 21:23:34 009

标签:

原文地址:http://www.cnblogs.com/liwp/p/5664937.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!