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 function not working

user12981132May 14 2013 — edited May 14 2013
Hi,
I have been searching for hours to solve this problem.
I can´t convert a date to only year, month or day etc...



select sysdate, TO_DATE(sysdate,'YYYY') from dual
ORA-01830: date format picture ends before converting entire input string
01830. 00000 - "date format picture ends before converting entire input string"




select sysdate, TO_DATE(sysdate,'MM') from dual
ORA-01843: not a valid month
01843. 00000 - "not a valid month"


select sysdate, TO_DATE(sysdate,'DD') from dual
ORA-01830: date format picture ends before converting entire input string
01830. 00000 - "date format picture ends before converting entire input string"

Please, if this is not the right category to post in just address me to the right one.
Thanks,
This post has been answered by Frank Kulash on May 14 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 11 2013
Added on May 14 2013
12 comments
3,414 views