Table of Contents

SUB_DATE_DATE

Function name

SUB_DATE_DATE

ST call

PROGRAM SUB_DATE_DATE_DEMO
 VAR
     DATE1,DATE2: DATE;
      TIME1: TIME;
    END_VAR
 TIME1:= SUB_DATE_DATE(IN1:=DATE1, IN2:=DATE2);
END_PROGRAM

Description

Subtracts the input variables, OUT = IN1 - IN2. The inputs are DATEs, the output is TIME.

Inputs

InputTypeDescription
IN1 DATEInput value
IN2 DATEInput value

Outputs

OutputTypeDescription
TIMEOutput value

Application example