zoukankan      html  css  js  c++  java
  • Js序列化时间

     
     var time = "/Date(1279270720000+0800)/";
     var tme1 = ChangeDateFormat(time);
     alert(tme1);
    image
    JS方法为:
     
    function ChangeDateFormat(cellval) {
        var date = new Date(parseInt(cellval.replace("/Date(", "").replace(")/", ""), 10));
        var month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1;
        var currentDate = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
        return date.getFullYear() + "-" + month + "-" + currentDate;
    }
  • 相关阅读:
    暑假第二周总结
    7.18-7.24 第一周周报
    poj 3295 Tautology
    2016多校 #2 1006 Fantasia
    codeforces 698B Fix a Tree
    codeforces 699B Bomb
    HDU 4578(线段树
    CF 600F( 二分图
    hdu 5517 Triple(二维树状数组)
    HDU HDOJ5412(树套树or整体二分
  • 原文地址:https://www.cnblogs.com/automation/p/2954599.html
Copyright © 2011-2022 走看看