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


OCIDateFromText()

Purpose

Converts a character string to a date type according to the specified format.

Syntax

sword OCIDateFromText ( OCIError           *err,
                        CONST text         *date_str, 
                        ub4                d_str_length, 
                        CONST text         *fmt,
                        ub1                fmt_length, 
                        CONST text         *lang_name,
                        ub4                lang_length, 
                        OCIDate            *date );

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_str (IN)

Input string to be converted to Oracle date.

d_str_length (IN)

Size of the input string, if the length is -1 then date_str is treated as a NULL-terminated string.

fmt (IN)

Conversion format. If fmt is a null pointer, then the string is expected to be in 'DD-MON-YY' format.

fmt_length (IN)

Length of the fmt parameter.

lang_name (IN)

Language in which the names and abbreviations of days and months are specified. If lang_name is a null string, (text *)0, then the default language of the session is used.

lang_length (IN)

Length of the lang_name parameter.

date (OUT)

Given string converted to date.

Comments

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 it receives an invalid format, language, or input string.

Related Functions

OCIErrorGet(), OCIDateToText()


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