Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: VARCHAR2 to DATE Conversion Error
OK thx for the help, it is the "TH" that throws it.
Should of read the documentation.
Date suffixes are only valid on output.
Table 2-11 Date Format Element Suffixes
Suffix Meaning Example Element Example Value TH Ordinal Number DDTH 4TH SP Spelled Number DDSP FOUR SPTH or THSP Spelled, ordinal number DDSPTH FOURTH Restrictions: a.. When you add one of these suffixes to a date format element, thereturn value is always in English.
b.. Date suffixes are valid only on output. You cannot use them to insert a date into the database.
"Mr. M" <mrm_at_nospamsorry.com> wrote in message
news:1028886620.23187.0.nnrp-08.c2d92da9_at_news.demon.co.uk...
> select to_char(to_date('August 10th 2002', 'Month DDth YYYY'),
> 'DD-MON-YYYY')
> from dual
>
> returns
>
> ERROR at line 1:
> ORA-01841: (full) year must be between -4713 and +9999, and not be 0
>
> Uhhh????
>
>
Received on Fri Aug 09 2002 - 06:28:46 CDT