How to convert milliseconds to a date in JavaScript

1 Answer

0 votes
const milliseconds = 194376472308

const date = new Date(milliseconds);

console.log(date.toDateString());

  
  
  
  
/*
run:
  
"Sat Feb 28 1976"
  
*/

 



answered Mar 20, 2022 by avibootz

Related questions

3 answers 220 views
2 answers 167 views
1 answer 147 views
2 answers 155 views
1 answer 138 views
1 answer 161 views
...