Skip Headers

Oracle Call Interface Programmer's Guide
Release 2 (9.2)

Part Number A96584-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

OCI Datatype Mapping and Manipulation Functions, 47 of 134


OCIDateTimeToText()

Purpose

Converts the given date to a string according to the specified format.

Syntax

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 );

Parameters

hndl (IN)

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.

err (IN/OUT)

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().

date (IN)

Oracle datetime value to be converted

fmt (IN)

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.

fmt_length (IN)

The length of the fmt parameter.

fsprec (IN)

Specifies the precision in which the fractional seconds is returned.

lang_name (IN)

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).

lang_length (IN)

The length of the lang_name parameter.

buf_size (IN/OUT)

The size of the buf buffer (IN).

The size of the resulting string after the conversion (OUT).

buf (OUT)

The buffer into which the converted string is placed.

Comments

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.

Returns

OCI_SUCCESS,

OCI_INVALID_HANDLE, if err is null,

OCI_ERROR, if any of the following is true:

Related Functions

OCIDateTimeFromText()


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback