How to convert milliseconds to a date in TypeScript

1 Answer

0 votes
const milliseconds = 1943764723082

const date = new Date(milliseconds);

console.log(date.toDateString());

  
  
  
  
/*
run:
  
"Wed Aug 06 2031" 
  
*/

 



answered Mar 20, 2022 by avibootz

Related questions

...