to_DATE(add_tm,'DD-MON-YYYY HH24:MI:SS') - need sort by date (not str)
450482Mar 27 2008 — edited Mar 27 2008Hi 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.