in the database I have a column called, edited date. I need to write a query.
where: {
lastEditedDateTime:!moment().subtract(10, 'days').toDate()
}
I need to write query that finds the last edited date is greater than 10 days.
in the database I have a column called, edited date. I need to write a query.
where: {
lastEditedDateTime:!moment().subtract(10, 'days').toDate()
}
I need to write query that finds the last edited date is greater than 10 days.
I think this is what you're looking for.
where: {
lastEditedDateTime: {
[Op.lte]: moment().subtract(10, 'days').toISOString()
}
}
Here are the search operators in Sequelize: https://sequelizedocs.fullstackacademy.com/search-operators/.