Date and Time functions

Help Contents

Introduction

Date and Time functions perform calculations on TIME, DATE, TIME_OF_DAY, and DATE_AND_TIME types. These date and time functions are supported:

Function Explanation
ADD_TIME Adds two interval values.
ADD_TOD_TIME Adds an interval to a time of day value.
ADD_DT_TIME Adds an interval to a date and time value.
SUB_TIME Subtracts two interval values.
SUB_TOD_TIME Subtracts an interval from a time of day value.
SUB_DT_TIME Subtracts an interval from a date and time value.
SUB_DATE_DATE Subtracts two date values.
SUB_DT_DT Subtracts two date and time values.
SUB_TOD_TOD Subtracts two time of day values.
MULTIME Multiplies an interval by a numeric value.
DIVTIME Divides an interval by a numeric value.
CONCAT_DATE_TOD Adds a time of day value to a date.

Standards Compliance

Table 30 - IEC 61131-3 Second Edition.

Table 35 & 36 - IEC 61131-3 Third Edition.

Further Information

Duration Literals

To learn about literals to represent a duration in time.

Date and Time Literals

To learn about literals to represent a date, a time of day, or date and time.

Arithmetic Functions and Operators

To learn about arithmetic operations on integer and real values.

Common Elements

To learn about other common language elements.

Glossary

For the meaning of terms used in Fernhill SCADA.