本文的问题对象为“Sun Mar 11 00:00:00 CST 2018”,转换为yyyy-MM-dd hh:mm:ss

var d = new Date(list[i].publishtime);
var publishDate= d.getFullYear() + '-' + (d.getMonth() + 1) + '-' + d.getDate() + ' ' + d.getHours() + ':' + d.getMinutes() + ':' + d.getSeconds();

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-21
  • 2022-01-01
  • 2022-12-23
  • 2022-01-01
  • 2021-10-10
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-22
  • 2022-12-23
  • 2021-11-28
  • 2022-12-23
  • 2022-02-16
  • 2022-12-23
相关资源
相似解决方案