SUB_DT_TIME - Subtracts an interval from a date and time value

Help Contents

Introduction

Returns the result of an interval subtracted from a date and time.

Syntax

Informal Syntax:

SUB_DT_TIME( In1, In2 )

Formal Syntax:

SUB_DT_TIME( In1:=expression, In2:=expression )

Parameters

ParameterTypeDescription
In1DATE_AND_TIMEThe date and time value.
In2TIMEThe interval to subtract from the date and time value.

In2 can be any interval value, positive or negative.

Return Value

The function SUB_DT_TIME returns a DATE_AND_TIME value, the result of In1 - In2.

Examples

ExampleReturn Value
SUB_DT_TIME( DT#2013-01-07-16:48:00.000, T#4h30m)DT#2013-01-07-12:18:00.000

Standards Compliance

IEC 61131-3 Second Edition: Table 30.8b.

IEC 61131-3 Third Edition: Table 35.8b.

Further Information

Date and Time Functions

For other date and time functions.

Glossary

For the meaning of terms used in Fernhill SCADA.