for DD script:http://www.dynamicdrive.com/dynamicindex6/localtime.htm
Hello,
Would it be possible to present the time as military time? (e.g. 1556 EST) I am developing a web timesheet that could use this script if that was a feature.
for DD script:http://www.dynamicdrive.com/dynamicindex6/localtime.htm
Hello,
Would it be possible to present the time as military time? (e.g. 1556 EST) I am developing a web timesheet that could use this script if that was a feature.
Certainly. You'll have to hardcode the timezone, though.
Change:
To:Code:this.container.innerHTML=formatField(hour, 1)+":"+formatField(minutes)+":"+formatField(seconds)+" "+ampm+" ("+dayofweek+")"
Code:this.container.innerHTML= (hour < 10 ? "0" + hour : hour) + formatField(minutes)
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Thanks for the quick reply, however, when I try that it just shows a static "51". Any suggestions?
Last edited by ebrad; 11-23-2005 at 08:09 PM.
How about this. Change:
to:Code:this.container.innerHTML=formatField(hour, 1)+":"+formatField(minutes)+":"+formatField(seconds)+" "+ampm+" ("+dayofweek+")"
Code:this.container.innerHTML=hour+":"+formatField(minutes)+":"+formatField(seconds)+" ("+dayofweek+")"
It works! Thank you so much for your help.
Bookmarks