Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Why does the year 2000 do this?
Sean wrote:
>
> I have a package and then a procedure within that gets past a date in
> string format like : 1/1/2000
>
> I then do a simple:
> select to_date(to_date(strDateStart, 'MM/DD/YYYY'), 'DD-MON-
> YYYY') into datStart from dual;
>
> Problem is that within PL/SQL, I keep getting the error:
> (full) year must be between -4793 and +9999 and not 0
>
> But if I do 2001, it works PERFECTLY. Is there a problem with the year
> 2000 or am I doing it incorrectly?
>
> Thanks,
> Sean
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
It looks like you are converting a string to a date and then trying to convert the date to a date. Try:
select to_date(strDateStart, 'MM/DD/YYYY') into datStart from dual;
--
Jerry Gitomer
Once I learned how to spell DBA, I became one
Received on Thu Apr 06 2000 - 22:17:32 CDT
![]() |
![]() |