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

dtcurrent()

The dtcurrent() function assigns the current date and time to a datetime variable.

Syntax

Usage

When the variable qualifier is set to zero (or any invalid qualifier), the dtcurrent() function initializes it with the year to fraction(3) qualifier.

When the variable contains a valid qualifier, the dtcurrent() function extends the current date and time to agree with the qualifier.

Example Calls

The following statements set the host variable timewarp to the current date:

The following statements set the variable now to the current time, to the nearest millisecond:

Example

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

Output


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