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, 30 of 134


OCIDateToText()

Purpose

Converts a date type to a character string.

Syntax

sword OCIDateToText ( OCIError                  *err, 
                      CONST OCIDate             *date, 
                      CONSTOraText OraText      *fmt, 
                      ub1                       fmt_length, 
                      CONST OraText             *lang_name,
                      ub4                       lang_length, 
                      ub4                       *buf_size, 
                      OraText                   *buf );

Parameters

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 date to be converted.

fmt (IN)

Conversion format, if NULL, (text *)0, then the date is converted to a character string in the default date format, DD-MON-YY.

fmt_length (IN)

Length of the fmt parameter.

lang_name (IN)

Specifies the language in which names and abbreviations of months and days are returned; default language of session is used if lang_name is NULL ((text *)0).

lang_length (IN)

Length of the lang_name parameter.

buf_size (IN/OUT)
buf (OUT)

Buffer into which the converted string is placed.

Comments

Converts the given date to a string according to the specified format. The converted NULL-terminated date string is stored in buf.

Refer to the TO_DATE conversion function described in the Oracle9i SQL Referencefor a description of format and multilingual arguments.

This function returns an error if the buffer is too small, or if the function is passed an invalid format or unknown language. Overflow also causes an error. For example, converting a value of 10 into format '9' causes an error.

Related Functions

OCIErrorGet(), OCIDateFromText()


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