Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

to_date using ddth ?

Yann39Mar 1 2011 — edited Mar 2 2011
Hi,

Oracle 10g r2.

I don't understand why this works :
select to_date('january 12 2011','MONTH DD YYYY HH24:MI:SS','nls_date_language=english') from dual
select to_date('january 12 2011','MONTH DDTH YYYY HH24:MI:SS','nls_date_language=english') from dual
and this don't :
select to_date('january 12th 2011','MONTH DDTH YYYY HH24:MI:SS','nls_date_language=english') from dual
=> ORA-01841: (full) year must be between -4713 and +9999, and not be 0

Is it possible to do the conversion without having to modify session parameters ?

Thanks.

Yann.
This post has been answered by MichaelS on Mar 2 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 30 2011
Added on Mar 1 2011
8 comments
1,899 views