Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

382
Vistas
What is the correct syntax for update TimeStamp column in PostgreSQL with Node JS?

I want update my timestamp column on PostgreSQL with this :

    function updateStatusCreated(request, response, next) {
  const date_generation_file = new Date();
  pool.query(
    `UPDATE data
        SET report_status = 'CREATED', date_generation = '${date_generation_file}'`
  ),
    (error, results) => {
      if (error) {
        return next(error);
      }
      return response.status(200).json(results);
    };
  return next();
}

But i receive this error message :

UnhandledPromiseRejectionWarning: error: syntax error at or near "'Tue Oct 19 2021 14:19:29 GMT+0200 (GMT+02:00)'"

The parameters of the column are "timestamp with timezone"

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The perfect choice is to use Sequelize ORM

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda