Returns the difference between two date and time values as an interval.
Informal Syntax:
Formal Syntax:
SUB_DT_DT( In1:=expression, In2:=expression )
Parameter | Type | Description |
---|---|---|
In1 | DATE_AND_TIME | The first date and time value. |
In2 | DATE_AND_TIME | The second date and time value to subtract from the first. |
The function SUB_DT_DT returns an interval, the result of In1 - In2.
If In2 is greater than In1, the returned interval will be negative.
Example | Return Value |
---|---|
SUB_DT_DT( DT#2013-01-07-12:00:00, DT#2013-01-01-00:00:00 ) | T#6d12h |
SUB_DT_DT( DT#2013-01-07-12:00:00, DT#2013-01-08-00:00:00 ) | T#-12h |
SUB_DT_DT( DT#2013-01-07-12:00:00, DT#2013-01-07-12:00:00 ) | T#0 |
Table 30.9b - IEC 61131-3 Second Edition.
Table 35.9b - IEC 61131-3 Third Edition.
For other date and time functions.
For the meaning of terms used in Fernhill SCADA.