SUB_DT_TIME - Subtracts an interval from a date and time value

Introduction

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

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

Table 30.8b - IEC 61131-3 2nd Edition.

Table 35.8b - IEC 61131-3 3rd Edition.

Further Information

Date and Time Functions

For other date and time functions.

Glossary

For definitions of the terms used in Fernhill SCADA.