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: New century - URGENT

Re: New century - URGENT

From: Heinz Juergens <juergens_at_keine.org>
Date: 1997/09/19
Message-ID: <01bcc491$8e64bd40$720101c8@tempo2>#1/1

Two digit dates:

Oracle internaly always stores the four digit date. even you can not see it without converting with to_char.
If you store dates in SQL, the current century (19) is added. If you need to store dates from next century, you have to convert it with a format mask (i.e. to_date('01.33.2035','dd.mm.yyyy'). In forms is the century not added, if you use format-masks like dd-mon-yyyy with a four digit year. You have to enter the correct year or write a conversion function.
To find the century on a stored date, you can select like this: Select to_char(mydate,'dd-mon-yyyy')
 from mytable;

I hope this helps.
feel free to contact me for more examples.

Heinz

-- 
Yes, I have the problem with chunk-mail. So, you have
to change the first word after the at-sign to reach me by e-mail.
The correct word at this place is computer. Sorry for that.
Heinz <juergens_at_keine.org>

Angela Maria dos Santos <amsantos_at_intra.singer.com.br> schrieb im Beitrag
<E4308A072804D111A870008048852B690B25D1_at_SINGERNT1>...

> We have various programs (PL/SQL, SQL, FORMS/3 and REPORT/1), that we
> must to convert to year 2000.
> Same tests were done, but the results were not good.
>
> Anybody knows how we can work with the function to_date, that dates are
> stored with 2 positions for year, and convert for 4 positions.
>
> Please, send us a answer.......
>
> Address: amsantos_at_intra.singer.com.br
>
>
Received on Fri Sep 19 1997 - 00:00:00 CDT

Original text of this message

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