Convert 24 Hour Clock (Military time) to 12 Hour Time
Convert time on a 24 hour clock, often called military time, to standard time which is in 12 hour format combined with AM or PM to distinguish time of day.
Enter Time in the format HHMM, where HH=Hours and MM=Minutes. For example: 2300, 1643, 0300, 300
Time in 24 hour format is used throughout the world to avoid ambiguity. Every day has 24 hours, and on the 24 hour clock, each hour is unique, ranging from 0000 (for midnight) to 23:59 for 11:59pm. Sometimes, 2400 is also used to designate midnight, meaning the end of the full 24 hour day.
Using a 12 hour clock divides the day into two parts, with AM/PM written after the time to distinguish if it is before noon - Ante Meridiem (AM), or after noon - Post Meridiem (PM). Without the AM/PM qualifier, it can be impossible to distinguish if the event occurred before or after noon. In addition, mistakes are sometimes made in written communication, where an AM is written when PM was intended. The 24 hour clock resolves the confusion, since each hour of the days has a unique number.
For the past 150 years (at least), many countries, particularly European, use a 24 hour clock. The United States still uses the 12 hour clock. However, the US military adopted the 24 hour clock during World War I, along with many other countries, and made it official during World War II.
Many industries and disciplines rely on the 24 hour clock to accurately reflect time. Computer systems use 24 hour time internally; For example, database and server logs use 24 hour format, often including seconds. So, for example 09:23:43 is 9:23AM and 43 seconds, wherease 21:23:43 is 9:23PM and 43 seconds. Whenever accurate time is critical, the 24 hour clock is used, which is why hospitals, aviation, navigation, astronomy, the military, to name a few, are all on 24 hour time;
24 hour clocks and watches abound. A stunning example is the Prague Astronomical Clock, which dates back to 1410 and is functional!
A notable differnce between 24 hour time and military time is that military time uses a leading zero, when needed, and no colon to separate hours and minutes. As examples, 9:00 and 14:30 are in 24 hour format, whereas 0900 and 1430 are the equivalent in military time format.
Calculating 12 hour time from 24 hour time
Converting 24 hour time to 12 hour time is relatively simple:
-
If the time is between 00:00 (0000) and 00:59 (0059), add 12 to the hour and AM. So, 00:00 becomes 12:00am and 00:59 becomes 12:59AM, the witching hour!
-
If the time is between 12:00 (1200) and 12:59 (1259), just add the PM qualifier: 12:00pm to 12:59pm, typically lunch hour.
-
If the time is between 1:00 (0100) and 11:59 (1159), just add AM: 1:00AM and 11:59AM (the hours between 1am and noon).
-
If the time is between 13:00 (1300) and 23:59 (2359), subtract 12 from the hour and append PM. 13:00 - 12:00 = 1:00PM, and 23:59-12:00 is 11:59PM.
Did we use the above rules to write this time conversion calculator?
No! Computers are so adept at working with the 24 hour time format that we simply used built in functions in the programming language!