//转时间格式
function getDateTime(date) {
var year = date.getFullYear();
var month = date.getMonth() + 1;
var day = date.getDate();
var hh = date.getHours();
var mm = date.getMinutes();
var ss = date.getSeconds();
return year + "-" + month + "-" + day + " " + hh + ":" + mm + ":" + ss;
}

使用方法;

getDateTime(new Date(时间戳));

相关文章:

  • 2021-10-13
  • 2021-09-14
  • 2022-12-23
  • 2022-12-23
  • 2021-07-12
  • 2022-12-23
  • 2021-11-28
猜你喜欢
  • 2021-12-22
  • 2022-12-23
  • 2022-12-23
  • 2021-11-28
  • 2021-08-30
  • 2021-11-28
  • 2022-02-20
相关资源
相似解决方案