How to Convert Postal Time Notation to Standard Clock Time
Convert postal time (24-hour clock with hundredths of an hour) to hours and minutes by hand or with a script, and check the result without altering other text.
Postal time notation is a decimal way of writing clock time. It is widely described as the format used on US Postal Service timekeeping records. A value such as 13.50 is not 1:50. It means hour 13 on a 24-hour clock, plus 50 hundredths of an hour, which is 1:30 PM. This guide explains how the notation works, how to convert it in either direction, and how to convert a whole text file without changing anything else in it.
What postal time conversion does to your text
Postal time has two parts. The number before the period is the hour on a 24-hour clock, from 00 (midnight) to 23 (11 PM). The two digits after the period are hundredths of an hour, not minutes. Each hundredth is 0.6 minutes, or 36 seconds.
Converting replaces each decimal value with an hours-and-minutes value. You can write the result on a 24-hour clock (13:30) or a 12-hour clock (1:30 PM). Only the time values should change. Labels, dates, spacing and line breaks should stay exactly as they were.
Pay records sometimes apply rounding rules to clock rings or to totals. The supplied evidence does not confirm what those rules are. The steps below convert values exactly and do not apply any rounding policy. If you need pay-accurate figures, check them against the official conversion chart or the rules from your employer or union.
The conversion formulas
- Postal to clock: minutes = hundredths × 0.6. The hour stays the same.
- Clock to postal: hundredths = minutes ÷ 60 × 100. The hour stays the same.
- 24-hour to 12-hour: hours 1–11 are AM, hour 12 is PM, hours 13–23 are PM after subtracting 12, and hour 00 is 12 AM.
Some conversions are not exact. A clock minute converts to a whole number of hundredths only when it is a multiple of 3, because 3 minutes equals exactly 5 hundredths. Every other minute gives a repeating decimal that has to be rounded. For example, 9:20 AM is 9.333…, usually written 09.33. Converting 09.33 back gives 9:19:48, not 9:20. A round trip from clock time to postal time and back can therefore drift by a few seconds.
Quick reference: worked values
Each row below is calculated with the formulas above. Rows marked "rounded" are not exact.
| Postal time | 24-hour clock | 12-hour clock | Note |
| 00.00 | 00:00 | 12:00 AM | exact |
| 07.75 | 07:45 | 7:45 AM | exact |
| 09.33 | 09:19:48 | 9:19:48 AM | rounded from 9:20 |
| 12.10 | 12:06 | 12:06 PM | exact |
| 13.50 | 13:30 | 1:30 PM | exact |
| 16.25 | 16:15 | 4:15 PM | exact |
| 23.99 | 23:59:24 | 11:59:24 PM | exact |
How to convert a single value by hand
- 1. Split the value at the period. In 16.25, the hour is 16 and the hundredths are 25.
- 2. Multiply the hundredths by 0.6: 25 × 0.6 = 15 minutes.
- 3. If the result has a fraction, multiply the fraction by 60 to get seconds. For example, 33 × 0.6 = 19.8 minutes, which is 19 minutes 48 seconds.
- 4. Write the result as hour:minutes. Here that is 16:15.
- 5. For 12-hour time, subtract 12 from hours 13–23 and add PM: 4:15 PM.
- 6. Check your work by reversing it: 15 ÷ 60 × 100 = 25, which matches the original.
Calculate durations before converting
Because postal time is decimal, you can subtract values directly. For example, 16.00 − 07.50 = 8.50 hours, which is 8 hours 30 minutes. Taking out a lunch from 11.75 to 12.25 (0.50 hours) leaves 8.00 hours. If you convert each value to minutes first and then subtract, every rounded value adds a small error. For totals, do the arithmetic in decimal and convert only the final result.
How to convert postal times in a text file
For a timecard export or a list of clock rings, a short script can find and replace every postal time. The main risk is false matches. A pattern like digits-period-digits will also catch prices (12.50), version numbers and other decimals. Before you run anything, decide which values count as times and narrow the pattern to fit.
Prerequisites:
- Python 3 is installed.
- The input file is plain text. The example assumes UTF-8 encoding. If your file uses a different encoding, change the encoding setting.
- You have a copy of the original file. The script writes to a new file and does not overwrite the input.
Example script (illustrative; not run against real postal data):
import re
from pathlib import Path
# 1-2 digit hour, a period, exactly two digits of hundredths.
# Skips values preceded by a digit, period or dollar sign,
# and values followed by another digit or period.
POSTAL_TIME = re.compile(r"(?<![\d.$])(\d{1,2})\.(\d{2})(?![\d.])")
def to_clock(match):
hours = int(match.group(1))
hundredths = int(match.group(2))
if hours > 23:
return match.group(0) # not a valid postal time; leave unchanged
minutes, seconds = divmod(hundredths * 36, 60)
return f"{hours:02d}:{minutes:02d}:{seconds:02d}"
source = Path("timecard.txt")
with source.open(encoding="utf-8", newline="") as f:
text = f.read()
converted, count = POSTAL_TIME.subn(to_clock, text)
with Path("timecard-converted.txt").open("w", encoding="utf-8", newline="") as f:
f.write(converted)
print(f"{count} values matched")
Notes on the options:
- newline="" on both reading and writing keeps the original line endings (LF or CRLF), so the output differs from the input only where times were replaced.
- The script outputs HH:MM:SS because hundredths × 36 seconds is always a whole number. This keeps the conversion exact. If you want HH:MM, apply your own rounding rule to the seconds.
- The count includes matches that were left unchanged because the hour was above 23. Compare the count with the number of values you expect.
- If your times always follow a label, such as "In " or "Out ", add that label to the pattern. This is much safer than relying on lookarounds alone.
Before (example input):
Clock in 07.50
Lunch out 11.75
Lunch in 12.25
Clock out 16.00
Uniform allowance $12.50
After (expected output, worked by hand from the formulas):
Clock in 07:30:00
Lunch out 11:45:00
Lunch in 12:15:00
Clock out 16:00:00
Uniform allowance $12.50
The dollar amount stays unchanged because the pattern skips values that come right after a dollar sign. A bare 12.50 with no dollar sign would still be converted. Scope the pattern to your data rather than assuming this guard covers every case.
Check the result
- 1. Compare the reported match count with the number of time values you expect in the file.
- 2. Run a line-by-line comparison (diff) between the original and the converted file. Only time values should differ.
- 3. Spot-check a few lines by hand with the formulas, including at least one value whose hundredths are not a multiple of 5.
- 4. Search the output for any values that still match the postal pattern. These are times the script skipped, or non-time decimals it was meant to leave alone.
- 5. Keep the original file until the converted version has been checked.
Gaps to be aware of
The supplied evidence does not confirm three things: the official rounding rules for postal clock rings or pay totals, whether every postal system writes hours with a leading zero, or how particular timekeeping exports format their values. The formulas here are plain arithmetic and are reliable for converting the notation itself. For anything tied to pay, compare your results with the official conversion chart from your employer.