Skip to main content

7.13.2 CONCAT_DATE

Function

Combine year, month, and date into DATE type date output

LD graphics

CONCAT_DATE

Parameter description

Interface variableDeclarationData typeDescription
YEARVar_IntDINTYear
MONTHVar_IntDINTMonth
DAYVar_IntDINTDate
Function nameReturn valueDATEDate: Year + Month + Date
  • Input value range YEAR:1970-2105; MONTH:1-12; DAY:1-31. If the input value exceeds the range (DAY needs to be judged according to the month, February needs to be judged according to whether it is a leap year), the return value is 16#0000

Example

  • An LD example is shown in the following animation:

CONCAT_DATE_GIF

  • ST example is shown in the following code:
OUT:=CONCAT_DATE(YEAR:=IN1,MONTH:=IN2,DAY:=IN3);