Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Size of Date field
Hi!
Length takes varchar2 or clob as an argument, thus your date is converted to varchar2 according your date format mask first, and length is taken from the result. Try for example to alter session set nls_date_format = 'RRRRMMDD HH24:MI:SS'; and see length changed.
Use dump() function instead:
SQL> select dump(a) from t;
DUMP(A)
Tanel.
"Jack Wang" <nospam_at_nospam.com> wrote in message
news:yb1Ya.40993$LD6.846165_at_news0.telusplanet.net...
> <Quotes from docs>
> Oracle uses its own internal format to store dates. Date data is stored in
> fixed-length fields of seven bytes each, corresponding to century, year,
> month, day, hour, minute, and second.
> </Quotes>
>
> SQL>select length(bday) from t;
>
> returns length of 9 instead of 7. Can someone explain it? Thanks.
>
> - Jack
>
>
>
Received on Wed Aug 06 2003 - 07:09:37 CDT