Converting 10 Digit Timestamp To Date
• 1 min read
Converting/reading 10 digit timestamp might seem confusing. I found this value in a field of a JSON response from an API where I was expecting a date. At the first, I couldn't figure out how to convert it to date for UI. After some research I found that the 10-digit timestamps represent the number of seconds.
const ts = 1504095567183