Hello,
I am attempting to build an online clock using javascript. How do I get the display (in my case I'm using a label control) to update every second?
Here is my code that i have on the LOAD event for the page
var todayDate=new Date();
var hours=todayDate.getHours();
var minutes=todayDate.getMinutes();
var seconds=todayDate.getSeconds();
var format ="AM";
if(hours11)
{format="PM";
}
if (hours 12) { hours = hours - 12; }
if (hours == 0) { hours = 12; }
if (minutes < 10){
minutes = "0" + minutes;
}
var outclock = hours + ":" + minutes + ":" + seconds + " " +format;
Appery("ClockFace").text(outclock);