OPC Data Logger - How to use 24-Hour Time Format for Timestamps in Data Presentations
In OPC Data Logger, is there any way to have timestamps logged using the 24-hour format instead of 12-hour?
This FAQ shows you how to enable the use of 24 hour instead of 12-hour time formatting in OPC Data Logger (V4.0.0.4 and earlier)
CAUTION!!! This solution requires editing the OPC Data Logger configuration file. It is recommended to work from a copy of this file when making any changes, invalid entries may result in a corrupt configuration file.
V4.0.0.5 introduced the ability to add custom FormatString directly from the UI, removing the need to customize the configuration file directly. The following information is still relevant for users with V4.0.0.4 and earlier.
There is a way to make Date/Time formats available in Table Mode and Detail Mode presentations that uses the 24-hour format for the hour place instead of the 12-hour format.
- Shutdown OPC Data Logger service
- Browse to C:\Program Files (x86)\Software Toolbox\OPC Data Logger
- Open "DataLogger.exe.config" in Notepad.
- Locate the entry that begins with:
<add key="AdditionalDateFormats" value - Available Date/Time formats are located within the quotation marks
- Add a vertical bar character to the end of this list (before the end quote mark) and add the desired format, using "HH" in the place of "hh" to convert the hour place from 12-hour format to 24-hour format.
- For example,

- See here for a complete list of DateTime Format Strings.
- For example,
- After adding the desired format, save the changes (File -> Save)
- Repeat steps 3-7, but for "DataLoggerService.exe.config".
Any formats added to this configuration file will now be available from the timestamp FormatString field when configuring your presentations in the OPC Data Logger.

And when logging to a text file, you can see that the output timestamp has the new format.
![]()
_Software%20Toolbox_OPC%20Data%20Logger_DataLoggerService.exe.c.png)