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 180 views
1 answer 226 views
1 answer 217 views
1 answer 230 views
1 answer 262 views
1 answer 221 views
...