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