informix
Informix DataBlade API Programmer's Manual
DataBlade API Function Descriptions

dtextend()

The dtextend() function extends a datetime value to a different qualifier. Extending is the operation of adding or dropping fields of a DATETIME value to make it match a given qualifier.

Syntax

Usage

The dtextend() function copies the qualifier-field digits of the in_dt datetime variable to the out_dt datetime variable. The qualifier of the out_dt variable controls the copy.

The function discards any fields in in_dt that the out_dt variable does not include. The function fills in any fields in out_dt that are not present in in_dt, as follows:

In the following example, a variable fiscal_start is set up with the first day of a fiscal year that begins on June 1. The dtextend() function generates the current year.

Return Codes

0 The operation was successful.
-1268 A parameter contains an invalid datetime qualifier.


Informix DataBlade API Programmer's Manual, Version 9.2
Copyright © 1999, Informix Software, Inc. All rights reserved