Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Boundary of date in Oracle?
ªü´ö 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.
![]() |
![]() |