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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Dates - control how stored?

Re: Dates - control how stored?

From: <hmerrill_at_my-deja.com>
Date: Wed, 22 Dec 1999 16:13:16 GMT
Message-ID: <83qtan$prh$1@nnrp1.deja.com>


In article <83qs1j$os1$1_at_nnrp1.deja.com>,   markp7832_at_my-deja.com wrote:
> In article <83qquc$nt7$1_at_nnrp1.deja.com>,
> hmerrill_at_my-deja.com wrote:
> > We are running Oracle 8i Enterprise on Linux, and are pretty new to
> > Oracle. Can you alter the way dates are stored in the database? Is
> > there a TO_DATE function(if there is, where can I find online
> > documenation for it?), and can that be used to alter the format that
a
> > date is stored in Oracle?
> >
> All columns of type date are stored in the same internal format that
> includes the century, year, month, data, hour, minute, and seconds.
> The to_date function is used to tell Oracle what format the date value
> being submitted for insert or update is in. You can find
documentation
> for all functions in the SQL manual.
>
> In sqlplus there is a on-line help feature that you can install. On
> Unix system there is an sqlplus help install script in the
> $ORACLE_HOME/bin directory, helpins. I have installed help manually
> using the scripts under the $ORACLE_HOME/sqlplus/admin/help.
>
> --
> Mark D. Powell -- The only advice that counts is the advice that
> you follow so follow your own advice --
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

Mark, in sqlplus when I do a select of some test dates that I inserted, this is what is displayed:

SQL> select * from TEST_DATES;

DATE1 DATE2

--------- ---------
08-DEC-99 12-DEC-99
12-AUG-99 01-DEC-99

SQL> Can you alter the default format that DATE fields are retrieved in, or do you have to use TO_CHAR for every date in a SELECT if you want to change that default format?

TIA Hardy Merrill

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Dec 22 1999 - 10:13:16 CST

Original text of this message

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