I'm having problems comparing two dates in timestamptz, I have a table with a field expiration date and I need to compare, that a date is not greater than the expiration date in the table, I'm using Sequelize
let ahora = new Date();
function verificar (id, ahora) {
return modelo.findOne({
where: {
id,
fecha_exp: {
[Op.gte]: ahora
}
}
});
}
I would appreciate your cooperation