Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: DAte conversion
longinus wrote:
>
> Becase the date type doesn't allow to store dates in 'DD.MM.YYYY'
> format,e.g. '12.03.2001'.
>
> Damien Salvador schrieb:
> >
> > On Tue, 27 Nov 2001 22:56:08 +0100, longinus
> > <longinus_at_zeus.polsl.gliwice.pl> a écrit:
> > >Date is stored in 'VARCHAR' field.
> >
> > >
> > >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?????
> >
> > Are you sure ALL your dates are in the DD.MM.YYYY form ?
> > Isn't there a MM.DD.YYYY date ? Maybe there is an invalid
> > date in your column.
> >
> > Why don't you store your dates in a date column ?
> >
> > --
> > Damien
Wrong! Dates are **not** a VARCHAR type - they are numbers stored in
the column. That is why the TO_DATE() function allows a picture clause
- to format the output.
-- Ron Reidy Oracle DBA Reidy Consulting, L.L.C.Received on Tue Nov 27 2001 - 17:27:52 CST
![]() |
![]() |