10.12.2012 Views

Oracle C++ Call Interface Programmer's Guide

Oracle C++ Call Interface Programmer's Guide

Oracle C++ Call Interface Programmer's Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Data Conversions<br />

Data Conversions for Date, Timestamp, and Interval Datatypes (Cont.)<br />

External Types<br />

Internal Types<br />

VARCHAR,C<br />

HAR DATE TS TSTZ TSLTZ<br />

OCCI INTERVALYM I/O - - - - I/O -<br />

INTERVAL DAY TO<br />

SECOND<br />

I/O - - - - - I/O<br />

OCCI INTERVALDS I/O - - - - - I/O<br />

Note: When assigning a source with time zone to a target without a time zone, the time<br />

zone portion of the source is ignored. On assigning a source without a time zone to a target<br />

with a time zone, the time zone of the target is set to the session’s default time zone<br />

(0) When assigning an <strong>Oracle</strong> DATE to a TIMESTAMP, the TIME portion of the DATE is<br />

copied over to the TIMESTAMP. When assigning a TIMESTAMP to <strong>Oracle</strong> DATE, the<br />

TIME portion of the result DATE is set to zero. This is done to encourage migration of<br />

<strong>Oracle</strong> DATE to ANSI compliant DATETIME data types<br />

(1) When assigning an ANSI DATE to an <strong>Oracle</strong> DATE or a TIMESTAMP, the TIME portion<br />

of the <strong>Oracle</strong> DATE and the TIMESTAMP are set to zero. When assigning an <strong>Oracle</strong> DATE<br />

or a TIMESTAMP to an ANSI DATE, the TIME portion is ignored<br />

(2) When assigning a DATETIME to a character string, the DATETIME is converted using<br />

the session’s default DATETIME format. When assigning a character string to a<br />

DATETIME, the string must contain a valid DATETIME value based on the session’s<br />

default DATETIME format<br />

(3) When assigning a character string to an INTERVAL, the character string must be a valid<br />

INTERVAL character format.<br />

1. When converting from TSLTZ to CHAR, DATE, TIMESTAMP and TSTZ, the value<br />

will be adjusted to the session time zone.<br />

2. When converting from CHAR, DATE, and TIMESTAMP to TSLTZ, the session time<br />

zone will be stored in memory.<br />

3. When assigning TSLTZ to ANSI DATE, the time portion will be zero.<br />

4. When converting from TSTZ, the time zone which the time stamp is in will be<br />

stored in memory.<br />

5. When assigning a character string to an interval, the character string must be a<br />

valid interval character format.<br />

4-24 <strong>Oracle</strong> <strong>C++</strong> <strong>Call</strong> <strong>Interface</strong> Programmer’s <strong>Guide</strong><br />

INTERVAL<br />

YEAR TO<br />

MONTH<br />

NTERVAL<br />

DAY TO<br />

SECOND

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!