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: Can Oracle 7.x store 4-digit year dates?

Re: Can Oracle 7.x store 4-digit year dates?

From: Chrysalis <cellis_at_iol.ie>
Date: 1997/08/10
Message-ID: <33EDE453.62EB@iol.ie>#1/1

Andreas Wilhelm wrote:
>
> Erwan Layman wrote:
> >
> > I am new to Oracle and I'm wondering if i can extend the year part of a
> > DATE data type into 4 digits, ie, DD-MMM-YYYY. I want to avoid revamping
> > my tables when year 2000 comes.
> >
> > Any help is appreciated. Thanks.
> >
> > Erwan Layman
>
> Dear Erwan,
>
> as far as I know, Oracle automatically handles the Year 200 problem by
> storing the dates internally correct.
>
> Cheers,
>
> Andreas

Yes, the Oracle date format *always* stores a 4-digit year (and always has).

There are two points to check:
1) Ensure that you use an appropriate format mask for storing and retrieving dates. The RR format for the last two digits of the year is useful.
2) Ensure that your operating system is capable of returning the full date to Oracle when you store dates as SYSDATE (and will continue to be so after year 2000)

HTH

-- 
Chrysalis

FABRICATI DIEM, PVNC
('To Protect and to Serve')
Terry Pratchett : "Guards Guards"
Received on Sun Aug 10 1997 - 00:00:00 CDT

Original text of this message

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