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: Ari Kaplan <akaplan_at_interaccess.com>
Date: 1997/09/18
Message-ID: <5vrf0u$sgg$1@nntp3.interaccess.com>#1/1

Angela Maria dos Santos (amsantos_at_intra.singer.com.br) wrote:
: 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

Angela,

To convert a string to a date format (for inserting into a DATE field), use:

TO_DATE(string,'DD-MON-YYYY')

To convert a date field (such as SYSDATE) to a string, use:

TO_CHAR(date_field,'DD-MON-YYYY')

This will assume a date in the format of "18-SEP-1997". There are other options for formatting. See my web page more much more information on this subject.

-Ari Kaplan
Independent Oracle DBA Consultant

<-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><->
<-> For 105+ Oracle tips, visit my Web Page:                      <->
<->                                                               <->
<->             http://homepage.interaccess.com/~akaplan          <->
<->                                                               <->
<->             email: akaplan_at_interaccess.com                    <->
<-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><-><->
Received on Thu Sep 18 1997 - 00:00:00 CDT

Original text of this message

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