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 176 views
2 answers 171 views
1 answer 136 views
1 answer 133 views
1 answer 193 views
1 answer 139 views
...