Answers for "ad 36 hours to date in js"

12

javascript add minutes to date

//add 30 minutes to date
var minutesToAdd=30;
var currentDate = new Date();
var futureDate = new Date(currentDate.getTime() + minutesToAdd*60000);
Posted by: Guest on July-31-2019
3

jquery get 2 hours frmo now

<html>
   <head>
      <title>JavaScript setHours Method</title>
   </head>
   <body>
      <script>
         var dt = new Date();
         dt.setHours( dt.getHours() + 2 );
         document.write( dt );
      </script>
   </body>
</html>
Posted by: Guest on April-17-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language