Re: simple date question

From: <edwards_at_garland.dnr.state.sc.us>
Date: 1997/06/11
Message-ID: <339F0853.2DDA_at_garland.dnr.state.sc.us>#1/1


AMARENDRA B NETTEM wrote:
>
> Oracle takes 7 bytes to store the date field(one byte each for
> century, year, month,day, hour, minute and second)
>
>

Are you sure thats right?
because I tried using that structure to bind to a date field using OCI and I'm not getting out the date I put in;

I entered this date into a column using this structure.

typedef struct _oradate{

    char century=19;
    char year=96;
    char month=9;
    char day=1;
    char hour=8
    char minute=0;
    char second=0;
};

The bind and the insert are successful but when I go to select the column data using SQLplus I get

SQL> select to_char(observe_date,'yyyy/mm/dd') from td3200_data where rownum <5;

8104/09/21
8104/09/21
8104/09/22
8104/09/22

What am I doing wrong?

	Steve Edwards
	SCDNR
Received on Wed Jun 11 1997 - 00:00:00 CEST

Original text of this message