Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

388
Views
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 answers
Answer question

0

The perfect choice is to use Sequelize ORM

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!