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!

Error which using TO_CHAR(TRUNC(SYSDATE),'DAY') FROM DUAL

714682Sep 21 2009 — edited Sep 21 2009
Hello everyone.

I have a pl/sql procedure which contains TO_CHAR(TRUNC(SYSDATE),'DAY') FROM DUAL to capture the DAY into a variable. Now when i access this procedure from someother application(Workflow), i get the error as ORA-01841: (full) year must be between -4713 and +9999, and not be 0.

If i don't use TO_CHAR(TRUNC(SYSDATE),'DAY') and hard code the value, it doesn't throw any error.

Any ideas on this error?

Is it something to do with the NLS_DATE?

Thanks

Regards,

Pavan, K
This post has been answered by Sven W. on Sep 21 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 19 2009
Added on Sep 21 2009
18 comments
1,885 views