How to fetch all records within the same day using deliveryDate
as parameter.
For example when passing 2023-02-13T12.23.00
as a parameter, I should get records that fall within that same day i.e 2023-02-13T09.23.00
, 2023-02-13T16.01.00
, regardless of the timestamps using Sequelize.
Here is the query I am using:
const result = await Order.findOne({
where: {
leaderId: leaderId,
deliveryDate: deliveryDate
}
});