Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Dates in OCI

Re: Dates in OCI

From: Edward Chan <ballgod_at_yahoo.com>
Date: Fri, 17 Sep 1999 17:51:10 GMT
Message-ID: <7rtv28$jk4$1@nnrp1.deja.com>


In article <7rt4t3$vui$1_at_nnrp1.deja.com>,   alexey_kochetov_at_my-deja.com wrote:
> In Oracle7 there isn't TIME-only datatype (DATE is equal TIMESTAMP).

Yes, I know. Oracle stores dates as a timestamp of 7 bytes (century, year, month, day, hour, minute, second). But is there a way in OCI to say, I'm only storing a time, or only storing a date?

When doing a query, I have to call OCIDefineByPos() and tell it how I want to receive the data. Since the query is done dynamically, I don't know the type until I get the type attribute from the select-list items in the query. But my problem here is, it only returns SQLT_DAT which as you said, is a timestamp. But I would like to be able to store only times, or only dates, and be able to determine if what I am getting back is only a time or only a date.

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Fri Sep 17 1999 - 12:51:10 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US