Date and time instructions
284
Part II IEC Instructions
CONCAT_DATE_INT
Concatenate INT values to form a date
To add an enable input and enable output to the instruction, select [With EN/ENO] from the
"Instructions" pane (LD, FBD or IL editor). To reuse an instruction select "Recently used" from the
context menu or press <Ctrl>+<Shift>+<v> in the programming window.
Inverse instruction: SPLIT_DATE_INT (see page 295)
PLC types Availability of CONCAT_DATE_INT (see page 1318)
Data type I/O Function
INT
1st input
2nd input
3rd input
year
month
day
DATE output result
BOOL output The Boolean output ERROR is set if the input values
are invalid date or time values.
DATE_value := CONCAT_DATE_INT(YEAR := YEAR_value,
MONTH := MONTH_value,
DAY := DAY_value,
ERROR => ERROR);
Description
CONCAT_DATE_INT concatenates the INTEGER values of year, month, and day.The result is
stored in the output variable of the data type DATE. The Boolean output ERROR is set if the input
values are invalid date or time values.
Data types
Example
In this example the function has been programmed in ladder diagram (LD) and structured text (ST).
POU header
All input and output variables used for programming this function have been declared in the POU
header.
LD
ST
When programming with structured text, enter the following: