Siemens Industry Online Support
Siemens AG
Entry type: Application example Entry ID: 31696259, Entry date: 10/26/2012

Collection of Tools for Date and Time Functions

  • Entry
  • Associated product(s)

With this entry we provide you with a collection of tools of date and time functions. The functions are described below in a brief overview.

  • Determining the calendar day
  • 24-hour time switch
  • Time-of-day schedule

A detailed description for each functional example is available in the attached documentation with the following structure:

  • Description of the functions
  • Block parameter lists of the functions
  • Example of an application
  • Technical specifications

The code for the date and time functions and examples in the form of a STEP 7 project or a STEP 7 library are available as a download.

Brief overview:

Date and time functions

  • Determining the calendar day
    This function is used to determine the calendar day of the current day in the current year or the calendar day from any specified date and the associated year.
  • 24-hour time switch
    This function is a realization of a time switch with a maximum switching time of 24 hours. It is possible to switch beyond the day limit (for example, from 23:00 - 01:00 of the following day). The weekdays on which switching is to be performed can be parameterized.
  • Time-of-day schedule
    This time switch can manage up to 255 entries in a schedule (data block). The switch-on conditions for each value (minute, hour, day, month) can be freely configured and combined with one another as desired. This enables you to realize, for instance, the following switching times:

    - Only on weekends at 8:00 h for each month
    - On each first of the month every full hour
    - In January from Monday to Friday at 12:00 h
    - Always on Friday at 18:25 h


Content of Downloads Download
Documentation 31696259_Uhrzeit_Bausteine_V10_e.pdf ( 457 KB )
SIMATIC STEP 7 code of the functional examples 31696259_DatumUhrzeitfunktionen.zip ( 1896 KB )

Current test environment:  

Components Test environment
PC platform 2.33 GHz 2 GB RAM
Operating system Windows XP
SIMATIC STEP 7 V5.4 with SP3 + HF1




04/2009 First edition

Security information
In order to protect technical infrastructures, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art IT security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about cyber security, please visit
Support to the statistics
With this function the IDs found are listed according to number (format .txt).

Generate list
Copy URL
Display page in new design
mySupport Cockpit
Related links