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 173 views
1 answer 223 views
1 answer 213 views
1 answer 226 views
1 answer 255 views
1 answer 214 views
...