943,602 Members | Top Members by Rank

Ad:
Sep 19th, 2005
0

add one hour to current time

Expand Post »
How can I add one hour to current time using javascript?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
aish is offline Offline
26 posts
since Aug 2005
Sep 19th, 2005
0

Re: add one hour to current time

I am not sure but in the following example why not add a +1 next to hour in the formula and see if that works.


Quote ...
<SCRIPT language="JavaScript">
<!--
var time = new Date()
var hour = time.getHours()
var min = time.getMinutes()
var sec = time.getSeconds()
document.write(hour + ":" + min + ":" + sec)
//-->
</SCRIPT>
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
g0rb4ch3v is offline Offline
85 posts
since Oct 2003

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: Get querystring
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: Page Opening - Cache Problem?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC