-1
I am creating an api in Node.js, using express and Sequelize as ORM. I would like to know, which expression should I use to recover DB data from a certain date. I’m using the date-fns to determine which exact date would be the beginning of this week and storing the value in a variable, called thisWeek, returning:
2019-12-29T03:00:00.000Z
How do I use this variable - thisWeek - to return only the results in the database from that date? Below is the code snippet that I am using to recover DB data.
const checkQtt = await Checkin.findAll({
where: { student_id: id }
});