informix
INFORMIX-ESQL/C Programmer's Manual
ESQL/C Function Library

dtsubinv()

The dtsubinv() function subtracts an interval value from a datetime value. The result is a datetime value.

Syntax

Usage

The dtsubinv() function subtracts the interval value in inv from the datetime value in dt and stores the datetime value in res. This result inherits the qualifier of dt.

The datetime value must include all the fields present in the interval value. When you do not initialize the variables dt and inv, the function might return an unpredictable result.

Return Codes

0 The subtraction was successful.
<0 An error occurred while performing the subtraction.

Example

The demo directory contains this sample program in the file dtsubinv.ec.

Output


INFORMIX-ESQL/C Programmer's Manual, Version 9.21
Copyright © 1999, Informix Software, Inc. All rights reserved