function ChangeDateFormat(val) {
        if (val != null) {
            var date = new Date(parseInt(val.replace("/Date(", "").replace(")/", ""), 10));
            //月份为0-11,所以+1,月份小于10时补个0     
            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;
        }
        return "";
    }


 

相关文章:

  • 2022-12-23
  • 2021-07-09
  • 2022-02-09
  • 2022-12-23
  • 2022-12-23
  • 2021-11-13
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
  • 2021-08-29
  • 2021-12-01
  • 2021-06-22
相关资源
相似解决方案