datefromJSON = req.body.occasion_date;
occasion_date = new Date(datefromJSON);
console.log(occasion_date);
//while running this i get log like this
//"Invalid Date"
when i get json data from req.body then save in datefromJSON var, and for storing into database i use to convert into Date object that get error
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…