I am using sequelize as my backend ORM. Now i wish to do some where operations on a Date.
More Speceficly i want to get all data where a date is from now and 7 days
You can also use Sequelize.literal() to perform dates manipulation in SQL.
Sequelize.literal()
The following code works with Postgres, but I'm quite sure something similar could be done in other systems as well:
model.findAll({ where: { start_datetime: { $gte: Sequelize.literal('NOW() - INTERVAL "7d"'), } } })