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;
    }
  • 相关阅读:
    第一章 jQuery基础方法回顾
    php无法执行python
    echarts
    logstash配置
    storm结合kafka
    spark中读取elasticsearch数据
    hadoop中读取protobuf数据
    spark1.3.1配置模板
    hadoop2.6.0配置模板
    使用jnetpcap捕获数据包进行流量检测
  • 原文地址:https://www.cnblogs.com/automation/p/2954599.html
Copyright © 2011-2022 走看看