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: Boundary of date in Oracle?

Re: Boundary of date in Oracle?

From: Antonio Galdo <5978186832#agaldo_at_bbvnet.com>
Date: 1997/11/19
Message-ID: <3473747F.672C@bbvnet.com>#1/1

ªü´ö Thenardier wrote:
> Another question is, the year in a date that displays
> in SQL/Plus is a 2-digit one. When the 2 digits are '01',
> how would Oracle treat that '01' in YYYY format? '1901',
> or '2001'? Then what should i do if i want to force
> Oracle to convert it into a '20YY' date? And what if
> i want it a '19YY' one instead?
>
> Thanx!
>
> Thenard

Try using the to_date and to_char functions. Here`s an example:

insert into my_table
values (to_date('11/19/1997'));

select to_char(date_col,'MM/DD/YYYY')
from my_table;

Hope it helps.



Antonio Galdo
Software Engineer
ATOS Group - Spain
email : agaldo_at_bbvnet.com
Received on Wed Nov 19 1997 - 00:00:00 CST

Original text of this message

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