ADD_DT_TIME - Add an interval to a date and time value

Help Contents


Returns the sum of a date and time and an interval.


Informal Syntax:

ADD_DT_TIME( In1, In2 )

Formal Syntax:

ADD_DT_TIME( In1:=expression, In2:=expression )


In1DATE_AND_TIMEThe date and time value.
In2TIMEThe interval to add to the date and time value.

In2 can be any interval value, positive or negative.

Return value:

The function ADD_DT_TIME returns a DATE_AND_TIME value, the result of adding In2 to In1.


ExampleReturn Value
ADD_DT_TIME( DT#2013-01-07 16:46:00.000, T#4h30m)DT#2013-01-07 21:16:00.000

Standards Compliance

IEC 61131-3 Second Edition: Table 30.3b.

IEC 61131-3 Third Edition: Table 35.3b.

Further Information

Date and Time Functions

For other date and time functions.


For the meaning of terms used in Fernhill SCADA.