the date user entered is to check the date is between or exist in start_Date column and end_Date column in MySQL db. using NodeJS
the date user entered is to check the date is between or exist in start_Date column and end_Date column in MySQL db. using NodeJS
If you use Sequelize to make such query then you can use Op.gte and Op.lte operators to achieve these two comparisons:
const records = model.findAll({
where: {
start_Date: {
[Op.lte]: date
},
end_Date: {
[Op.gte]: date
},
}
})