Troubleshooting
WinCC Runtime time input shows AM/PM when Windows is 24-hour
Short answer
The picker on a DateTime I/O field takes its format from the language active in WinCC Runtime, not from the taskbar clock: English (United States) gives AM/PM entry, English (United Kingdom) gives 24-hour. Enable a 24-hour language and make it the start language, set that language's Short time to HH:mm and Long time to HH:mm:ss in Windows, or remove tt from the picker's custom pattern. Then rebuild, download and test 14:07:45.

On this page
- Why the picker ignores the Windows clock
- Confirm it is the runtime language
- Fix 1: switch the active runtime language
- Fix 2: give the language you keep a 24-hour format
- Fix 3: remove tt from a custom picker pattern
- Worked example: entering 2:07:45 PM under hh:mm:ss tt and HH:mm:ss
- Verify the fix
- Questions asked
The picker behind a DateTime I/O field takes its time format from the language active in WinCC Runtime, not from the taskbar clock. With English (United States) active, the picker offers h:mm:ss tt — a 12-hour hour plus an AM/PM selector — even when Windows shows 24-hour time everywhere else. Switch the active runtime language to one whose format is 24-hour, such as English (United Kingdom), give the language you must keep a 24-hour format in Windows, or remove the tt token from a custom picker pattern. An analog clock object on the same screen was never evidence of a fault: it draws the system time, while the picker is a locale control that reads the regional format of the active language. The fixes below take minutes, and the worked example shows exactly which pattern token to remove.
Why the picker ignores the Windows clock #
Runtime resolves formats per language, not per PC. Each language activated in the project reads the Windows regional format of that language while it is active. English (United States) carries a 12-hour designator by default, so an active en-US runtime language gives AM/PM entry; English (United Kingdom) and English (Ireland) carry 24-hour formats. Changing the format Windows shows for the currently displayed region does not touch the English (United States) format, which is why the taskbar can go 24-hour while the field still opens with an AM/PM selector.
An I/O field always enforces the format behind its tag — the same discipline that makes a WinCC flexible 2008 I/O field reject fractional timer values — so a 12-hour picker is configuration behavior, not a broken field. The reflex generalizes: engineering software follows region settings elsewhere too, and CX-Drive inverter visibility follows the regional filter in exactly this way, hiding inverters until the software's own regional filter matches the PC.
Confirm it is the runtime language #
Work through this list before editing the project:
- The taskbar clock and the Windows Region dialog show 24-hour formats: Short time
HH:mmand Long timeHH:mm:ss. - An analog clock object on the same screen renders 24-hour time.
- Only the input dialog of the DateTime I/O field shows an AM/PM selector.
- The project languages include English (United States), and it is the language active when the field receives focus.
- Switching the active runtime language in Runtime changes the selector without any project edit.
If all five hold, the active runtime language owns the picker format — apply one of the three fixes below. If the picker stays 12-hour under every language, check the regional format Windows holds for each of those languages before touching the project.
Fix 1: switch the active runtime language #
- In the project's runtime settings, open Language & font and enable a 24-hour language — English (United Kingdom) or English (Ireland) — alongside English (United States).
- Set that language as the start language, so Runtime opens in it even when nobody touches a language button.
- Rebuild all and re-download to the runtime PC; a changes-only compile can leave cached language resources carrying the old format.
- Start Runtime and open the DateTime I/O field. The picker now offers hours 00–23 with no AM/PM selector.
Keep English (United States) enabled if the project texts need it: the format follows whichever language is active, so translations keep working while time entry stays 24-hour. A language switch swaps more than formats — every runtime language brings its own texts and fonts, which is why Korean text fails to display on a Comfort panel when those resources are missing. Enable only the languages the station will actually use.
Fix 2: give the language you keep a 24-hour format #
If the station must run English (United States), edit the format of that language itself. In Windows, open the Region settings, select English (United States) as the format, and set Short time to HH:mm and Long time to HH:mm:ss. Windows stores formats per language, so this changes only the English (United States) format — exactly the one the runtime reads while that language is active. Restart Runtime afterwards so it re-reads the regional formats. Microsoft documents the same two dropdowns as the way to move Outlook calendars between a 12-hour and a 24-hour clock; the format behind the picker is that same Windows setting.
Fix 3: remove tt from a custom picker pattern #
Where the project uses a date-time picker control rather than the picker behind an I/O field, set a custom display pattern. The tokens are case-sensitive: yyyy for the four-digit year, MM for the month, dd for the day, HH for the 24-hour hour, hh for the 12-hour hour, mm for the minute, ss for the second, and tt for the AM/PM designator. Remove tt and use HH, and the picker stops offering AM/PM; leave tt in and the selector comes back. A pattern of yyyy-MM-dd HH:mm:ss gives unambiguous 24-hour entry. If neither language-side fix is possible — a locked-down runtime PC where formats cannot change, for example — replace the DateTime input with three I/O fields over integer tags for hour (00–23), minute and second, and combine them into the DateTime tag with a script behind a button.
Worked example: entering 2:07:45 PM under hh:mm:ss tt and HH:mm:ss #
Inputs, and where each comes from:
- The entry the operator wants: 45 seconds past 2:07 in the afternoon — a shift-time entry of the kind this field is used for.
- The active pattern under an English (United States) runtime language:
h:mm:ss tt, the 12-hour default that produces the AM/PM selector. - The target pattern:
HH:mm:ss, a two-digit 24-hour hour.
The rule: hh renders the 12-hour hour over two digits and tt appends AM or PM; HH renders the 24-hour hour over two digits; converting an afternoon hour to 24-hour form means adding 12.
The arithmetic: 2 + 12 = 14, so the same entry renders as 14:07:45 under HH:mm:ss and as 02:07:45 PM under hh:mm:ss tt. Minutes and seconds pass through unchanged; only the hour changes.
The result: the entry is accepted either way, but only the HH:mm:ss pattern lets the operator type an afternoon hour directly — under the 12-hour pattern the picker offers the AM/PM selector instead.
The decision: any entry past 12:59:59 in the afternoon is ambiguous on a machine HMI in 12-hour form, so if operators enter afternoon times, remove tt and set HH in the pattern, or move the active runtime language to a 24-hour format — then run the verification below.
Verify the fix #
- Rebuild all, download, and start Runtime.
- Click in the DateTime I/O field: the hours must run 00–23 with no AM/PM selector.
- Enter 14:07:45 and confirm the connected tag reads the value back.
- Switch through every project language and re-test. English (United States) will show AM/PM again — that is the format it carries, not a regression.
Questions asked
Does the same rule apply to Comfort and Advanced panels?
Yes. The picker takes the time format of the active runtime language on Comfort and Advanced panels too. A panel has no Windows Region dialog, so set the panel's own regional format for that language, or switch the runtime language to one whose format is 24-hour. The fix is the same switch, made on the panel instead of the runtime PC.
Does switching the runtime language change the value stored in the tag?
No. The DateTime tag always stores the same point in time; 14:07:45 and 2:07:45 PM are one stored value with two renderings. The active language and any display pattern change only how the picker accepts and shows the entry, never the tag's range or resolution. The PLC sees the identical value before and after the switch.
Why does the AM/PM selector come back during the shift?
Someone switched the runtime language back to English (United States), whose format carries the AM/PM designator. Every project language carries its own time format, so the selector follows the language, not the last fix. Make the 24-hour language the start language so Runtime opens in it, and check any screen button or automated language switch used in the project.
Which English formats give 24-hour entry?
English (United States) is the odd one out: its default format includes an AM/PM designator. English (United Kingdom) and English (Ireland) default to a 24-hour clock, as do most European language formats such as German. If your site must run English (United States), set that format's Short time and Long time in Windows to the 24-hour pattern instead of switching languages.


