ORA-01849 for timestamp date conversion
citicbjDec 29 2008 — edited May 18 2010I try to do these SQL select statements
1. SELECT cast (column_1 as timestamp )FROM my_table; --- column_1 is a column in my_table with data type as varchar2 and data looks like 25-OCT-2008
18:33:19
2. select to_timestamp (column_1, 'DD-MON-YYYY HH12:MI:SS') from my_table;
I got ORA-01849: hour must be between 1 and 12.
Then I run this sql : ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY HH12:MI:SS';
Then I execute above select statements again and got the same error message. Please advise where am I wrong. Thanks.