# Chaanging Military Time to Regular Time!

**URL:** <https://forum.kirupa.com/t/chaanging-military-time-to-regular-time/151869>\
**Category:** Uncategorized\
**Created:** [June 18, 2005, 10:57pm UTC](https://forum.kirupa.com/t/chaanging-military-time-to-regular-time/151869 "2005-06-18T22:57:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![WandMan](https://avatars.discourse-cdn.com/v4/letter/w/a88e4f/32.png) [@WandMan](https://forum.kirupa.com/u/WandMan)\
**Post date:** [June 18, 2005, 10:57pm UTC](https://forum.kirupa.com/t/chaanging-military-time-to-regular-time/151869/1 "2005-06-18T22:57:54Z")

</div>

Hi,

I used this action script and tried changing the 12 to 24 and back and nothing changed:

onClipEvent (enterFrame) {  
myTime = new Date();  
nSeconds = myTime.getSeconds();  
nMinutes = myTime.getMinutes();  
nHours = myTime.getHours();  
if (nHours\>=12) {  
ampm = “pm”;  
} else {  
ampm = “am”;  
}  
if (nHours\>=13) {  
nHours = nHours-12;  
}  
if (length(nMinutes) == 1) {  
nMinutes = “0”+nMinutes;  
}  
if (length(nSeconds) == 1) {  
nSeconds = “0”+nSeconds;  
}  
nTime = nHours+":"+nMinutes+":"+nSeconds+" "+ampm;  
}

I want it on regular time. How?
