Skip to main content

Example: Date and Time

Product: CODESYS Development System

The DateTimeUtilities.project example shows how to use the date and time functions of the SysTime and Util libraries.

The project contains examples on the following topics:

  • Reading timer tick values since system startup

  • Read UTC time

  • Convert UTC time to local time

  • Local time and time zone operations

Description

In the visualization, placeholders (example: %t[ddd MMM dd.MM.yyyy HH:mm:ss]) are used to display the current system time. The displayed format can be modified with placeholders.

For more information, see: Placeholders with Format Definition

System requirements and restrictions

Programming system

CODESYS Development System (version 3.5.14.0 or higher)

Runtime system

CODESYS Control Win (version 3.5.14.0)

Add-on components

-

Note

_example_icon.png DOWNLOAD Project