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: Varchar to date

Re: Varchar to date

From: Ganesh Raja <ganesh_at_gtfs-gulf.com>
Date: 28 Nov 2001 01:32:25 -0800
Message-ID: <a8aed4.0111280132.5637c596@posting.google.com>


longinus <longinus_at_zeus.polsl.gliwice.pl> wrote in message news:<3C040C19.5E731F77_at_zeus.polsl.gliwice.pl>...
> Date is stored in 'VARCHAR' field.
> SQL> select min(end_date)
>
> brings:
>
> MIN(END_DA
> ----------
> 15.10.2001
>
> I want to convert end_date (VARCHAR) for date and choose the oldest
> one..
> SQL> select min(to_date(end_date,'DD.MM.YYYY'))
> reached';
> ERROR:
> ORA-01839: date not valid for month specified
>
> What is wrong?????

The error is self explanatory ... It is not a problem with u'r NLS Settings..

Uhave a Data there like 31.02.1999 Which is not valid bcos there no 31 days in febrauary.

Pls recheck u'r data.

If i may comment having the date has a Varchar2 is bad as far as design and performance go.

Pls Check u'r design.

Regards,
Ganesh R Received on Wed Nov 28 2001 - 03:32:25 CST

Original text of this message

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