Hi my clock is working fine, the problem I having is its stay on PM I have to manualy change it to AM can some help me with it thanks.
This is my script.
onClipEvent (enterFrame) {
myTime = new Date();
nSeconds = myTime.getSeconds();
nMinutes = myTime.getMinutes();
nHours = myTime.getHours();
if (hours>=12) {
AMPM = “AM”;
} else {
AMPM = “PM”;
}
if (hours>=13) {
nHours = nHours-12;
}
if (length(nMinutes) == 1) {
nHinutes = “0”+nMinutes;
}
if (length(nSeconds) == 1) {
nSeconds = “0”+nSeconds;
}
nTime = nHours+":"+nMinutes+":"+nSeconds+" "+AMPM;
}