Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
11
rated 0 times [  13] [ 2]  / answers: 1 / hits: 15502  / 10 Years ago, sun, april 27, 2014, 12:00:00

I am looking to add 5 hours & 30 mins to a certain time.



I have,



var d = new Date(Sun Apr 27 2014 16:47:53 GMT+0100);


any help would be much appreciated.


More From » javascript

 Answers
25

Try this



var d = new Date(Sun Apr 27 2014 16:47:53 GMT+0100);
d.setHours(d.getHours() + 5);
d.setMinutes(d.getMinutes() + 30);

[#71279] Thursday, April 24, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
lidialyrick

Total Points: 737
Total Questions: 104
Total Answers: 89

Location: Andorra
Member since Sat, May 27, 2023
1 Year ago
;