var date:Date=new Date();
var h=date.getHours()
var m=date.getMinutes()
var s=date.getSeconds()
var sign
if (h<12) {
sign ="AM"
}
else {
sign="PM"
}
while (h>12) {
h=h-12;
}
if (h<10) {
h="0"+h;
}
if (m<10) {
m="0"+m;
}
if (s<10) {
s="0"+s;
}
txttime.text=h+":"+m+":"+s;
txtsign.text=sign
Nevermind.