How can I convert a Unix timestamp to DateTime in Javascript?
1. Convert the unix timestamp into milliseconds by multiplying it by 1000
2. Use the newly created milliseconds value to create a date object with the new Date() constructor method
3. Use the .toLocaleString() function to convert the date object into human-friendly date strings
Example 1
const unixTimestamp = 1575909015
const milliseconds = unixTimestamp * 1000 // 1575909015000
Example 2
const unixTimestamp = 1575909015
const milliseconds = 1575909015 * 1000 // 1575909015000
const dateObject = new Date(milliseconds)