阿神2017-04-10 15:13:19
如果有日期对象的话,直接valueOf()...
(new Date)
// Wed May 06 2015 16:01:58 GMT+0800 (CST)
(new Date).valueOf()
// 1430899328358
var date = 'Wed May 06 2015 16:01:58 GMT+0800 (CST)';
date = new Date(date);
date.valueOf()
怪我咯2017-04-10 15:13:19
估计是要写写
var dateSplitted = date.split('-'); // date must be in DD-MM-YYYY format
var formattedDate = dateSplitted[1]+'/'+dateSplitted[0]+'/'+dateSplitted[2];
var miao=new Date(formattedDate).getTime();