Compare that a dates in timestamptz format, PostgreSQL, Sequelize

1

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

    
asked by Javi 24.12.2018 в 20:32
source

0 answers