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

188
Views
Convierta la marca de tiempo de la API a la secuencia de comandos de la aplicación de fecha

Ejecutándose en el script de la aplicación, hoja de Google. Obtengo la marca de tiempo de la API y devuelvo este resultado:

 [[1.6370611672429312E18], [1.63706107263277082E18], [1.63706100204943616E18], [1.63706094340754534E18], [1.63706078474499994E18], [1.63706064715950106E18], [1.63706061367677235E18], [1.63706061367677082E18], [1.63706061367676902E18], [1.63706061367676749E18], [1.63706061367676595E18], [1.63706061367676442E18]],

Ahora quiero convertir esta marca de tiempo a la fecha para que sea así: 10/28/2021 10:30

Intento este código: var convertDate = Utilities.formatDate(timestamp, "GMT", "MM-dd-yyyy HH:mm:ss"); pero no funciona ninguna sugerencia

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Suponiendo que esas marcas de tiempo están en nanosegundos, cree una Fecha dividiendo el valor de la marca de tiempo por un millón.

 const timestamps = [[1.6370611672429312E18], [1.63706107263277082E18]]; for (let i = 0; i < timestamps.length; i++) { const timestamp = new Date(timestamps[i][0] / 1000000); const convertDate = Utilities.formatDate(timestamp, "GMT", "MM-dd-yyyy HH:mm:ss"); }
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!