How to Write 9 O'Clock in 24-Hour Format
9 a.m. is 09:00 and 9 p.m. is 21:00 in 24-hour time. Learn the conversion rule, notation variants and how to convert times in text safely.
The short answer
In 24-hour time, 9 in the morning is written as 09:00 and 9 in the evening is written as 21:00. Many contexts also accept 9:00 for the morning time, without the leading zero. A bare "9" with no AM/PM marker or other context cannot be converted reliably, because it could mean either time.
| 12-hour time | 24-hour time | Compact (military-style) form |
| 9:00 AM | 09:00 | 0900 |
| 9:30 AM | 09:30 | 0930 |
| 9:00 PM | 21:00 | 2100 |
| 9:45 PM | 21:45 | 2145 |
The conversion rule
The 24-hour clock counts hours from 00 at midnight to 23 in the last hour before the next midnight. Converting from the 12-hour clock depends on the AM/PM marker:
- AM hours from 1 to 11 stay the same: 9 AM becomes 09:00.
- PM hours from 1 to 11 get 12 added: 9 PM becomes 9 + 12 = 21, so 21:00.
- 12 AM (midnight) becomes 00:00.
- 12 PM (noon) stays 12:00.
- Minutes never change: 9:15 PM becomes 21:15.
To check a converted value, run the rule backward: any hour from 13 to 23 minus 12 gives the PM hour. 21 minus 12 is 9, which confirms that 21:00 is 9 PM.
Notation variants for 9 o'clock
- 09:00 is the two-digit form used by the ISO 8601 standard and by most software, timetables and data formats.
- 9:00 without the leading zero is common in everyday writing in many countries that use the 24-hour clock.
- 0900 without a colon is the compact form used in military and some aviation and logistics contexts; it is typically spoken as "zero nine hundred."
- 21:00 and 2100 are the corresponding evening forms.
Russian, the language of the original search query, conventionally uses the 24-hour clock in writing. Phrases such as "9 утра" (9 in the morning) correspond to 09:00 or 9:00, and "9 вечера" (9 in the evening) corresponds to 21:00. In formal Russian text the colon is the standard separator, although a period, as in 9.00, also appears in some styles.
What a 12-to-24-hour conversion does to your text
A clock-notation converter, whether a dedicated localization tool or a find-and-replace pattern, takes text containing 12-hour times such as "9 AM" or "9:30 p.m." and replaces each time with its 24-hour equivalent. The intended effect is narrow: only the hour digits change, the AM/PM marker is removed, and minutes and surrounding words stay as they were. No specific tool was evaluated for this guide, so the points below describe general behavior to look for rather than documented features of a particular product.
The parts of the input that matter most are the hour, the optional minutes, and the period marker. AM and PM appear in many spellings, including "AM", "am", "a.m." and "A.M.". The space before the marker may also vary: besides an ordinary space, text can contain a no-break space (U+00A0) or, in output from recent versions of the Unicode CLDR locale data for US English, a narrow no-break space (U+202F). These characters look like normal spaces but will not match a pattern that only expects an ordinary space.
Example: converting times with a pattern
The following Python snippet is an illustrative example of a pattern-based conversion. It has not been run for this guide, so test it on your own text before relying on it.
import re
pattern = re.compile(
r"\b(1[0-2]|0?[1-9])(?::([0-5][0-9]))?[ \u00A0\u202F]?([AaPp])\.?[Mm]\.?(?!\w)"
)
def to_24h(match):
hour = int(match.group(1))
minute = match.group(2) or "00"
period = match.group(3).lower()
if period == "a":
hour = 0 if hour == 12 else hour
else:
hour = 12 if hour == 12 else hour + 12
return f"{hour:02d}:{minute}"
text = "Doors open at 9 AM; the show ends at 9:30 p.m."
print(pattern.sub(to_24h, text))
Based on the pattern's logic, the expected output for the example sentence is:
Doors open at 09:00; the show ends at 21:30
Notice that the final period of the sentence disappears. The pattern consumes the trailing dot of "p.m.", and in the original text that same dot also ended the sentence. This is the kind of unintended change to check for after any automated conversion.
Checks before and after converting
- Leave bare numbers alone: "9" in "9 items" or "room 9" is not a time, and a time without AM/PM such as "at 9" needs a human decision.
- Watch for times written in words, such as "nine o'clock" or "9 in the evening"; a digit-and-marker pattern will not catch them.
- Check sentence punctuation where "a.m." or "p.m." ended a sentence.
- Look for invisible spacing characters (U+00A0, U+202F) if some times were not converted.
- Confirm which output style your audience expects: 09:00, 9:00 or 0900.
- Compare a sample of the original and converted text side by side to confirm that only the time tokens changed.
Gaps in this guide
No evidence about a specific localization product was available, so this guide does not name tools, compare features or describe any tool's verified output. The conversion rule and notation conventions above are general, widely documented principles; tool-specific behavior, such as how a given converter handles ambiguous times or invisible characters, should be confirmed in that tool's own documentation or by testing.