Extracts the following fields from a DATE_AND_TIME value:
Informal Syntax:
SPLIT_DT( IN, YEAR, MONTH, DATE, HOUR, MINUTE, SECOND, MILLISECOND )
Formal Syntax:
SPLIT_DT( IN:=expression,
YEAR=>variable, MONTH=>variable, DATE=>variable
HOUR=>variable, MINUTE=>variable, SECOND=>variable, MILLISECOND=>variable )
Parameter | Type | Description |
---|---|---|
IN | DATE_AND_TIME | The date and time value to split into separate fields. |
YEAR | REF_TO INT | The year value extracted from the input value. |
MONTH | REF_TO INT | The month value extracted from the input value. |
DATE | REF_TO INT | The date value extracted from the input value. |
HOUR | REF_TO INT | The date value extracted from the input value. |
MINUTE | REF_TO INT | The date value extracted from the input value. |
SECOND | REF_TO INT | The date value extracted from the input value. |
MILLISECOND | REF_TO INT | The date value extracted from the input value. |
None.
Example of an informal call:
VAR Year, Month, Date : INT; Hour, Minute, Second, MS : INT; END_VAR SPLIT_DT( DATE#2013-01-10-21:50:00.000, Year, Month, Date, Hour, Minute, Second, MS )
The variable values after the SPLIT_DT function call will be:
Variable | Value |
---|---|
Year | INT#2013 |
Month | INT#1 |
Date | INT#10 |
Hour | INT#21 |
Minute | INT#50 |
Second | INT#0 |
MS | INT#0 |
IEC 61131-3 Third Edition: Table 36.7a.
For other date and time functions.
For the meaning of terms used in Fernhill SCADA.