Oracle Call Interface Programmer's Guide
Release 9.0.1

Part Number A89857-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, 19 of 135


OCIDateCheck()

Purpose

Checks if the given date is valid.

Syntax

sword OCIDateCheck ( OCIError          *err,
                     CONST OCIDate     *date, 
                     uword             *valid );

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)

Date to be checked

valid (OUT)

Returns zero for a valid date. Otherwise, the ORed combination of all error bits specified as follows:

Macro Name  Bit Number  Error 

OCI_DATE_INVALID_DAY 

0x1 

Bad day 

OCI_DATE_DAY_BELOW_VALID 

0x2 

Bad day low/high bit (1=low) 

OCI_DATE_INVALID_MONTH 

0x4 

Bad month 

OCI_DATE_MONTH_BELOW_VALID 

0x8 

Bad month low/high bit (1=low) 

OCI_DATE_INVALID_YEAR 

0x10 

Bad year 

OCI_DATE_YEAR_BELOW_VALID 

0x20 

Bad year low/high bit (1=low) 

OCI_DATE_INVALID_HOUR 

0x40 

Bad hour 

OCI_DATE_HOUR_BELOW_VALID 

0x80 

Bad hour low/high bit (1=low) 

OCI_DATE_INVALID_MINUTE 

0x100 

Bad minute 

OCI_DATE_MINUTE_BELOW_VALID 

0x200 

Bad minute low/high bit (1=low) 

OCI_DATE_INVALID_SECOND 

0x400 

Bad second 

OCI_DATE_SECOND_BELOW_VALID 

0x800 

Bad second low/high bit (1=low) 

OCI_DATE_DAY_MISSING_FROM_1582 

0x1000 

Day is one of those missing from 1582 

OCI_DATE_YEAR_ZERO 

0x2000 

Year may not equal zero 

OCI_DATE_INVALID_FORMAT 

0x8000 

Bad date format input 

For example, if the date passed in was 2/0/1990 25:61:10 in (month/day/year hours:minutes:seconds format), the error returned would be:

OCI_DATE_INVALID_DAY | OCI_DATE_DAY_BELOW_VALID | OCI_DATE_INVALID_HOUR | 
   OCI_DATE_INVALID_MINUTE.

Comments

This function returns an error if date or valid pointer is null.

Related Functions

OCIErrorGet(), OCIDateCompare()


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, 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