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

108
Views
TimestampNanos to date and time in React.JS

I'm getting "TimestampNanos": 1619166999211820716 from a API. Only need to translate this to date and time in my React JS. Tried all kind of solution no one works.

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

0

Try:

const date = new Date(timeStampNanos / 1000000)

// For the timestamp in your question, this yields a date & time in April of 2021
// Which seems about right :)

The date constructor in JS takes in a timestamp in milliseconds, so you need to divide it by 1 million - the amount of nanoseconds in 1 millisecond.

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!