Configuring Date and Time Display Format on Siemens WinCC Comfort Panels
Engineer field-notes on resolving the 24-hour clock request, the system events 330018 and 330019, regional substitution defaults, and the Win7 / Win10 simulation path error in TIA Portal V13 SP1 through V17 projects running on TP900, TP1200, TP1500, TP1900, and TP2200 Comfort panels.
Overview
WinCC Comfort / Advanced / Professional on a TP-series panel renders the date and time of an HMI tag using two distinct mechanisms: the regional settings of the active runtime language on the panel, and the optional HMI system events 330018 (date format) and 330019 (time format) pushed from the project at runtime. When the runtime language on the panel has no user-defined regional override, TIA Portal silently substitutes the default format string configured under the project language node. This substitution default is the value TIA Portal writes into the project under Languages & Resources → Project languages → [Language] → Date format / Time format.
The most common field complaint is that the panel insists on a 12-hour clock (hh:mm:ss) even when the engineering project was authored with a 24-hour expectation (HH:mm:ss). The cause is the lowercase/uppercase token on the substitution default — hh is 12-hour, HH is 24-hour. Toggling the project language, manually setting a system event, or changing the panel's Control Panel regional settings forces the corrected token into the runtime.
System Events 330018 and 330019
Two HMI system events are documented in the SIMATIC WinCC V13 SP1 Engineering Manual and persist unchanged in V14, V15, V15.1, V16, and V17. They are not listed in the HMI Alarms editor's default system event filter, which is why the panel reports “event not found” the first time an engineer searches the alarms editor. Both events are case-sensitive on the parameter string.
| Event ID | Effect | Payload (string parameter) | Fired by |
|---|---|---|---|
| 330018 | Sets the date display format | Token string, e.g. DD.MM.YYYY
|
System event row, VBScript, scheduled task |
| 330019 | Sets the time display format | Token string, e.g. HH:mm:ss
|
System event row, VBScript, scheduled task |
The Time format must use capital HH for 24-hour rendering. Lowercase hh forces 12-hour with AM/PM suffix. The Date format follows the substitution default unless overridden by event 330018. On a Comfort panel with no system event present, the substitution default for the active runtime language is applied at every Runtime start.
Date and Time Format Token Reference
The format parser used by WinCC Runtime on Comfort panels is identical to the substitution defaults defined in the project tree under Languages & Resources → Project languages. The following table lists every documented token.
| Token | Output example | Description |
|---|---|---|
YYYY |
2025 | Four-digit year |
YY |
25 | Two-digit year |
MM |
07 | Month with leading zero (01-12) |
M |
7 | Month without leading zero (1-12) |
MMMM |
July | Localized full month name |
MMM |
Jul | Localized abbreviated month name |
DD |
09 | Day of month with leading zero |
D |
9 | Day of month without leading zero |
dddd |
Wednesday | Localized full weekday name |
ddd |
Wed | Localized abbreviated weekday name |
HH |
23 | Hour (24-hour) with leading zero |
H |
23 | Hour (24-hour) without leading zero |
hh |
11 | Hour (12-hour) with leading zero |
h |
11 | Hour (12-hour) without leading zero |
mm |
59 | Minutes with leading zero |
ss |
59 | Seconds with leading zero |
tt |
PM | AM/PM designator (only with lowercase hh) |
mm means month when isolated. In WinCC Comfort Runtime, mm paired with hours always means minutes, and MM always means month. The lowercase/uppercase pair hh/HH is the only place where casing controls a 12-vs-24-hour choice.Prerequisites
- TIA Portal V13 SP1 / V14 / V15 / V15.1 / V16 / V17 with the matching WinCC Comfort / Advanced / Professional installed.
- TP-series Comfort panel (TP900, TP1200, TP1500, TP1900, TP2200 Comfort) or KTP-series Comfort. KTP400 Comfort and KTP700 Comfort are also supported from firmware V14 onward.
- If configuring via the panel's Control Panel: an active runtime on the device with operator rights to enter the Control Panel applet.
- If configuring via system events: an HMI tag, a VBScript, or a scheduled task capable of issuing the alarm with the format string as the parameter value.
- For Windows 7 or Windows 10 engineering hosts, the WinCC RT Advanced / Professional simulation must be running on the same Windows installation where
C:\Windows\System32\control.exeexists; the simulation does not have its own embedded Control Panel applet.
Configuring the Date and Time Format
Two independent paths exist. Use Path A if the format is project-wide and the physical panel is the only runtime target. Use Path B if the format must change at runtime (for example, automatically on a language switch).
Path A — Set via the panel Control Panel (physical device)
- On the Comfort panel, press the Control Panel button in the loader (or Start → Settings → Control Panel).
- Open Regional and Language Options (early firmware) or Regional Settings (firmware V14 onward).
- Select the runtime language that matches the project language you intend to leave active (for example, English (United States) for en-US).
- Switch to the Date tab. Set the short date pattern to
DD.MM.YYYY(European) orMM/DD/YYYY(US) as required by the SOP. - Switch to the Time tab. Set the time format to
HH:mm:ssfor 24-hour display orhh:mm:ss ttfor 12-hour display. - Apply with OK. Restart Runtime when prompted so the cache rebuilds against the new regional pattern.
Path B — Set via system events 330018 and 330019 in TIA Portal
- Open the HMI device editor in the project tree.
- Double-click HMI Alarms under the device node.
- In the Alarms editor table header, switch the view filter to System Events.
- Right-click the table → Import system events → manually add rows for ID
330018(date format) and ID330019(time format). TIA Portal does not surface these in the default filter, so they must be added by ID. - Click the Parameters column of the new event row and enter the literal format string, for example
"DD.MM.YYYY"for 330018 and"HH:mm:ss"for 330019. The string is case-sensitive. - Compile and download the project to the panel.
- At runtime, the events fire on the first start of Runtime and apply the new format. Trigger them on demand by raising the alarm from a VBScript or from a scheduled task attached to a language-switch event.
HMIRuntime.Alarms.SysFct with the resulting event ID and string.Runtime Language and Regional Substitution
The substitution default is applied whenever the active runtime language on the panel has no equivalent user-defined regional pattern, or whenever the panel boots and cannot find a matching Windows CE regional setting in its registry hive. The default for en-US in TIA V13 SP1 is M/d/yyyy for the date and h:mm:ss tt for the time. The default for de-DE is dd.MM.yyyy for the date and HH:mm:ss for the time. The 12-hour default on en-US is the most common reason the time field appears as 1:23:45 PM on an English project.
To override the substitution default for a single language without changing the operating system on the panel:
- Project tree → Languages & Resources.
- Right-click the target project language (for example, English (United States)) → Set as active runtime language to verify it is the one shipped to the panel.
- Open the language's Properties and edit the Date format and Time format fields. The format parser is the same token set used in Path B.
- Recompile and download the full project (not a delta) to ensure the new substitution default is written to the panel.
Simulation Mode Limitations
When the project is run in PLCSIM together with WinCC RT Advanced / Professional on a Windows 7 or Windows 10 engineering host, the panel loader's Control Panel button calls \windows\control.exe. On a desktop Windows installation this file is at C:\Windows\System32\control.exe; the WinCE-style path does not resolve and the loader raises a path error. This is not a TIA Portal bug — it is the loader's hard-coded assumption that the operating system is Windows CE or Windows Embedded Compact 7 (used on the physical Comfort panels).
To change the date/time format in simulation, use one of the following workarounds:
- Edit the Project languages → [active language] substitution default and recompile. The simulation picks it up at the next start of Runtime.
- Change the date/time format of the engineering host's user account via Settings → Time & language → Region. The simulation defers to the host's regional settings for some fields. See Microsoft's Windows 10 date format change guidance.
- Add events 330018 and 330019 via Path B and trigger them from a VBScript at Runtime start.
Applying Format via VBScript (Advanced)
The VBScript snippet below sets the time format to 24-hour and the date format to ISO 8601 short form. Drop it into a global script scheduled to run on Runtime start.
' --- SetTimeFormat_24h.vbs ---
' Place under "Scheduled tasks" with trigger = "Runtime start"
Dim sDate, sTime
sDate = "yyyy-MM-dd"
sTime = "HH:mm:ss"
' Event 330018 = Date format, 330019 = Time format
HMIRuntime.Alarms.SysFct 330018, sDate
HMIRuntime.Alarms.SysFct 330019, sTime
For multi-language panels, read the format strings from text lists keyed by the active language ID. Example: list row 0 = en-US → M/d/yyyy|H:mm:ss, row 1 = de-DE → dd.MM.yyyy|HH:mm:ss, and dispatch with HMIRuntime.Language as the index.
Troubleshooting Matrix
| Symptom | Likely cause | Resolution |
|---|---|---|
| Time shows 1:23:45 PM despite project language being en-US | Lowercase hh in the substitution default |
Change the project's time format to HH:mm:ss or trigger 330019 with "HH:mm:ss"
|
| 330018 / 330019 not found in HMI Alarms | Default filter hides system events | Filter on "System events" then right-click → Import system events and add IDs manually |
| Control Panel button raises a path error in simulation | Loader expects \windows\control.exe (WinCE path) |
Use the project-languages substitution default or trigger 330018/330019 from a script |
| Date shows 7/9/2025 on a German project | Substitution default for en-US leaked into the runtime | Verify the active runtime language and set the substitution default for the language actually active |
| Time format reverts after each panel reboot | Control Panel changes are persistent on the device but host-bound in simulation | Use system events or recompile the project with the corrected substitution default |
| 12-hour clock appears even after applying 330019 | Parameter string was "hh:mm:ss" not "HH:mm:ss"
|
Re-enter the parameter in capital HH and re-download the project |
| AM/PM missing on 12-hour display | Format lacks tt token |
Append tt to the time format, e.g. "hh:mm:ss tt"
|
| Date format on physical panel differs from PC engineering view | Regional substitution default not downloaded | Recompile and download the full project, not a delta |
| Format change has no effect on a tag output field | Tag is of type String with a hard-coded value | Bind the field to a tag of type Date and Time so the runtime applies the format |
Verification
- After applying Path A or Path B, restart Runtime on the panel or on the simulation host.
- Open an HMI screen that contains a date/time field (typically the system screen or a custom screen with a date/time output field bound to a tag of type Date and Time).
- Confirm the displayed time matches the format literal exactly, including the AM/PM designator when applicable.
- If the format is incorrect, raise HMI alarm 330019 manually from the alarm view (open alarm → acknowledge) and re-check; this confirms the runtime is processing the event at all.
- For multi-language panels, switch the runtime language in the loader and re-verify; the substitution default for each language must be set independently.
- Power-cycle the panel to confirm the format is persistent and not held only in volatile Runtime memory.
Related Standards and Reference Material
The format tokens are a WinCC implementation of the .NET DateTime format specifier set, which itself is an extension of the ICU (International Components for Unicode) pattern syntax standardized in UTS #35: Unicode Locale Data Markup Language (LDML). When porting projects between TIA Portal versions, the token set is stable from V13 SP1 to V17; the only breaking change is the addition of the K time-zone token in V15.1, which is not consumed by Comfort Runtime and is silently ignored.
For additional reference on the underlying token semantics, see the Microsoft .NET custom date and time format strings page. For host-side Windows configuration used in simulation, refer to Microsoft's Windows 10 date format change guidance.
FAQ
How do I force a 24-hour clock on a TP900 Comfort panel?
Open HMI Alarms → System events → Import system events and add alarm 330019 with the parameter string "HH:mm:ss" (capital HH). Compile and download. The format is applied at Runtime start; for permanent behaviour also update the project language substitution default under Languages & Resources.
Why are events 330018 and 330019 missing from the alarms editor?
The default HMI Alarms filter hides system events. Switch the filter dropdown to System events, then right-click the table and choose Import system events; both IDs can then be added manually because the import dialog filters on ID rather than on the current view filter.
Why does the Control Panel button fail in PLCSIM / WinCC RT simulation?
The loader calls the WinCE path \windows\control.exe which does not exist on Windows 7 or Windows 10 hosts. Configure the format through the project's substitution default under Languages & Resources, or trigger 330018/330019 from a VBScript on Runtime start, rather than through the in-loader Control Panel applet.
What is the difference between hh and HH in the time format?
Lowercase hh renders a 12-hour clock (1-12) and requires the tt token to display AM/PM; uppercase HH renders a 24-hour clock (00-23) and ignores the tt token. The casing controls only the hour; mm always means minutes and MM always means month.
Does the format token set change between TIA Portal V13 SP1 and V17?
No. The token set documented above is stable from V13 SP1 through V17. V15.1 introduced the K time-zone token in the project language substitution default, but Comfort Runtime ignores it; no token in current use has been removed or renamed in this range.