Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Size of Date field
"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.
SQL> create table xtest( x date );
Table created.
SQL> insert into xtest values ( sysdate );
1 row created.
SQL> select length(x), vsize(x) from xtest;
LENGTH(X) VSIZE(X)
---------- ----------
20 7
SQL>
<quote from docs>
LENGTH returns the length of char in characters.
VSIZE returns the number of bytes in the internal representation of expr.
</quote>
-- BillyReceived on Wed Aug 06 2003 - 04:38:14 CDT