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 84 views
1 answer 121 views
1 answer 98 views
1 answer 135 views
1 answer 168 views
1 answer 134 views
...