I'm using Node.js together with mysql, express and html.
When I'm retrieving the results from the database I get the following date,
2016-03-16T00:00:00.000Z, even though the type in mysql is date.
My query:
app.get('/list', function (req,res) {
connection.query('SELECT `ondate`,`projectname`,`hours` FROM `entries` WHERE YEARWEEK(`ondate`, 1) = YEARWEEK(CURDATE(), 1) ORDER BY ondate DESC ,projectname ASC ', function(err, rows, fields) {
res.json({error: err, result: rows});
});
})
Is there a way I can set the ondate field to ignore the time?