Are you first timer at Why not join us and start exchange your programming knowledge with everyone. Register today!

JS - Add hour to date object

0 votes
added Jan 28 in Javascript by LC Marshal Captain (22,750 points)
 var dt = new Date();
 dt.setHours( dt.getHours() + 2 );
 document.write( dt );

<!--Sat Dec 15 2018 15:49:50 GMT+0530 (India Standard Time)-->


Please log in or register to response this reference. - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.