TIMESTAMPDIFF(unit,begin,end); //更多请阅读:https://www.yiibai.com/mysql/timestampdiff.html_牛客网_牛客在手,offer不愁
function timestampToTime(timestamp) { var date = new Date(timestamp * 1000); //timestamp 为10位需*1000,timestamp 为13位的话不需乘1000 var Y = date.getFullYear() + '-'; var M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-'; var D ...