How to get the hour form the current date in Node.js

1 Answer

0 votes
const today = new Date();

const hour = today.getHours();
   
console.log(hour);
 
 
/*
run:
 
9
 
*/

 



answered Feb 27, 2025 by avibootz

Related questions

1 answer 181 views
1 answer 227 views
1 answer 219 views
1 answer 230 views
1 answer 264 views
1 answer 222 views
...