Answers for "add 5:30 time javascript"

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
0

add 5:30 time javascript

var istdate = new Date(new Date().getTime() + (5*60+30)*60000);
var [date,restdata] =istdate.toISOString().split("T");
var time = restdata.split(".")[0];
console.log("Date is:",date);
console.log("Time is:",time);
Posted by: Guest on May-27-2021

Code answers related to "add 5:30 time javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language