28
rated 0 times
[
30]
[
2]
/ answers: 1 / hits: 19180
/ 13 Years ago, mon, november 7, 2011, 12:00:00
I have a date string that looks like the following javascript format.
I want to convert this to a date object and add one minute.
timeObject = Mon Nov 07 2011 06:41:48 GMT-0500 (Eastern Standard Time);
timeObject.setSeconds(timeObject.getSeconds() + 60);
====== SOLUTION ==========
never mind. I got it...
var time = $('#myDiv').val(); // = Mon Nov 07 2011 06:41:48 GMT-0500 (Eastern Standard Time);
var timeObject = new Date(time);
alert(timeObject);
timeObject.setSeconds(timeObject.getSeconds() + 60);
alert(timeObject);
More From » time