Oracle Call Interface Programmer's Guide Release 2 (9.2) Part Number A96584-01 |
|
OCI Datatype Mapping and Manipulation Functions, 37 of 134
Converts the given string to Oracle datetime type in the OCIDateTime descriptor, according to the specified format.
sword OCIDateTimeFromText ( dvoid *hndl, OCIError *err, CONST OraText *date_str, size_t dstr_length, CONST OraText *fmt, ub1 fmt_length, CONST OraText *lang_name, size_t lang_length, OCIDateTime *datetime );
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()
.
The input string to be converted to an Oracle datetime.
The size of the input string. If the length is -1 then date_str
is treated as a NULL-terminated string.
The conversion format. If fmt
is a null pointer, then the string is expected to be in the default format for the datetime type.
The length of the fmt
parameter.
Specifies the language in which the names and abbreviations of months and days are specified. The default language of the session is used if lang_name
is null (lang_name
= (text *)0
).
The length of the lang_name
parameter.
The given string converted to a date.
Refer to the description of the TO_DATE
conversion function in the Oracle8i or later SQL Reference for a description of the format argument.
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. |
|