How to get the milliseconds from the current date in TypeScript

1 Answer

0 votes
const today: Date = new Date();

const milliseconds: number = today.getMilliseconds();
   
console.log(milliseconds);
 
 
/*
run:
 
119 
 
*/

 



answered Feb 27, 2025 by avibootz

Related questions

2 answers 168 views
2 answers 161 views
1 answer 131 views
1 answer 125 views
1 answer 181 views
1 answer 131 views
...