The timestamp stored in the database is 2014-11-11 00:00:00 and returned to the foreground in the wrong format

  node.js, question

The time stamp stored in the database is 2014-11-11 00:00:00
Take it out of the database
Print row[0].startTime
The result is Mon Apr 20 2015 01:49:19 GM plus 0800 (Chinese standard time)
Res.send’s return to the front desk became 2014-11-11T00:00:00.000Z
How can I return it to the front desk in normal format (2014-11-11 00:00:00)
Thank you all ~ ~

Use momentjs to convert or. . . Turn by yourself:

var format = function(date) {
 
 var year = date.getFullYear();
 Getmonth () plus 1;
 var day = date.getDate();
 
 var hour = date.getHours();
 var minute = (date.getMinutes() < 10) ?  0' plus date.getminutes (): date.getminutes ();
 //var minute = date.getMinutes();
 var second = (date.getSeconds() < 10) ?  0' plus date.getseconds (): date.getseconds ();
 //var second = date.getSeconds();
 
 Return year plus'-'plus month plus'-'plus day plus'' plus hour plus':' plus minute plus':' plus second;
 };

According to the needs of whether inpointsAndsecondFill in zero ~