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

670
Views
Formato de fecha Javascript dentro de NestJs

Tengo una entidad ScrapeResult mikroOrm, estoy tratando de crear una nueva Fecha usando este fragmento de código newScrapeResult.date = new Date() y obtengo 2022-07-17T17:07:24.494Z esta salida.

Necesito convertir el formato anterior a yyyy-mm-dd hh mm ss este formato. ¿Cómo puedo hacer esto? Guardaré este formato en la base de datos.

about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

Esto podría ayudarte

 function currentTime() { let date = new Date() let a = date.getFullYear() let b = date.getMonth()+1 // JS months are 0 indexed, 0 = January, 11 = December let c = date.getDate() let d = date.getHours() let e = date.getMinutes() let f = date.getSeconds() return a+'-'+b+'-'+c+' '+d+' '+e+' '+f } console.log(currentTime())
about 4 years ago · Santiago Gelvez 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!