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(add_tm,'DD-MON-YYYY HH24:MI:SS') - need sort by date (not str)

450482Mar 27 2008 — edited Mar 27 2008
Hi I have a procedure to select datetime from a table which is of timestamp datatype. However, when I try to do the folloiwng it gives me the error ORA-01830: date format picture ends before converting input string.

This is what I am doing

select to_DATE(add_datetime,'DD-MON-YYYY HH24:MI:SS')
from table1.
I do not wish to use to_char because I am getting these values on the UI and the user can sort by this column. In that case it will be sorted as string and not date.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 24 2008
Added on Mar 27 2008
4 comments
16,230 views