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

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle Date datatype Y2K Issues

Re: Oracle Date datatype Y2K Issues

From: Kevin Loney <Kevin.Loney_at_astramerck.com>
Date: Tue, 17 Nov 1998 16:53:12 -0500
Message-ID: <ffm42.1123$y33.2544465@newshog.newsread.com>


Some people use the RR format, but it's an incomplete solution since it forces you to use a 100-year window for dates even if that is not the window you need. No matter how you administer your database, it is simple for a programmer to write a program that gets around your NLS settings and puts incorrect data into your database. I strongly recommend that you write a simple little script to select the min and max value for every DATE column and every column defined as a date-type column. You may be surprised at what you find.

Note that even if you convert to using RR now, existing data may have already been inserted with wonderful year values like 0091 or 9797 or 2048. The best way to avoid these is to use check constraints at the column level (specifying all 4 digits of the year when you do it).

If Oracle only had domains...

hth.
Kevin
http://www.kevinloney.com

Sanjay Hans wrote in message <01be1237$8f47c820$40cb15a5_at_oempre-install>...
>Would appreciate your suggestions on Oracle Date datatype Y2K issue.
>
>Is it sufficient to issue the following commands to ensure that all the
>date datatype fields in
>the database are Y2K compliant:
>alter session set nls_date_format ='DD-MON-YYYY' for each connection to
>Oracle session and then insert/ update the date fields in the tables.
>Or I should use 'DDMMRR' format to insert/update values in the date
>datatype fields.
>
>Thanks in advance.
Received on Tue Nov 17 1998 - 15:53:12 CST

Original text of this message

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