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 88 views
1 answer 126 views
1 answer 103 views
1 answer 137 views
1 answer 172 views
1 answer 136 views
...