Answers for "javascript add time to date"

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
2

how to add date in java script

var someDate = new Date();
var numberOfDaysToAdd = 6;
someDate.setDate(someDate.getDate() + numberOfDaysToAdd);
Posted by: Guest on May-08-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language