Oracle Call Interface Programmer's Guide Release 2 (9.2) Part Number A96584-01 |
|
OCI Datatype Mapping and Manipulation Functions, 47 of 134
Converts the given date to a string according to the specified format.
sword OCIDateTimeToText ( dvoid *hndl, OCIError *err, CONST OCIDateTime *date, CONST OraText *fmt, ub1 fmt_length, ub1 fsprec, CONST OraText *lang_name, size_t lang_length, ub4 *buf_size, OraText *buf );
The OCI user session handle or environment handle. If a user session handle is passed, the conversion takes place in the session's NLS_LANGUAGE and the session's NLS_CALENDAR, otherwise the default is used.
The OCI error handle. If there is an error, it is recorded in err
and this function returns OCI_ERROR. Obtain diagnostic information by calling OCIErrorGet()
.
Oracle datetime value to be converted
The conversion format. If it is a null string pointer, (text*)0
, then the date is converted to a character string in the default format for that type.
The length of the fmt
parameter.
Specifies the precision in which the fractional seconds is returned.
Specifies the language in which the names and abbreviations of months and days are returned. The default language of the session is used if lang_name
is null (lang_name
= (OraText *)0
).
The length of the lang_name
parameter.
The size of the buf
buffer (IN).
The size of the resulting string after the conversion (OUT).
The buffer into which the converted string is placed.
Refer to the description of the TO_DATE
conversion function in the Oracle9i or later SQL Reference for a description of format and multilingual arguments. The converted NULL-terminated date string is stored in the buffer buf
.
OCI_SUCCESS,
OCI_INVALID_HANDLE, if err
is null,
OCI_ERROR, if any of the following is true:
|
Copyright © 1996, 2002 Oracle Corporation. All Rights Reserved. |
|