formatDate(date, fmt) { if (/(y+)/.test(fmt)) { fmt = fmt.replace(RegExp.$1, ...
formatDate(date, fmt) { if (/(y+)/.test(fmt)) { fmt = fmt.replace(RegExp.$1, ...
// 根据时间戳获取年月日时分秒 function getYMDHMS(time) { var year = time.getFullYear(), month = time.getMonth() + 1, date = time.getDate ...
转载说明源处! select FROM_UNIXTIME(time/1000,'%Y-%m-%d %h:%i:%s') from order 注意:一定要用时间戳除以1000,不然转的是null,在这儿坑了一会儿。 ...
小程序里面写法 ...
export const dateFormatter = (nows) => { if (!nows) return '' var now = new Date(nows) v ...
...