Hi guys,
I’ve got this code that displays the time but, I want the time to display dynamically, updated by the user’s sytem clock so it always displays the “current time”.
myNow=new Date();
myDay=myNow.getDay();
myMonth=myNow.getMonth();
myDate=myNow.getDate();
myHours=myNow.getHours();
myMinutes=myNow.getMinutes();
mySeconds=myNow.getSeconds();
myYear=myNow.getFullYear();
theHour=myHours
noon=""
if (myHours>=13){
theHour=myHours-12;
}
else {theHour==myHours;
}
if (myMinutes<10){
myMinutes=“0”+myMinutes;
}
if (myHours<12){
noon=“am”;
}
else {
noon=“pm”
}
theDay=new Array(“Sunday”,“Monday”, “Tuesday”, “Wednesday”,“Thursday”, “Friday”, “Saturday”);
theMonth=new Array(“January”,“February”,“March”,“April”,“May”,“June”,“July”,“August”,“September”,“October”,“November”,“December”);
theDate=theDay[myDay]+"
“+myDate+” “+theMonth[myMonth]+”, “+myYear+”
"
+theHour+":"+myMinutes+" "+noon;
Any help would be greatly appreciated. Thank-You very much!
artane