Converting a textual day of month using TO_DATE, ORA-01858
Date: Tue, 29 Apr 2008 13:11:12 -0700 (PDT)
I am trying to solve the problem of converting a day of the month provided as a character value ('One') into an Oracle date value:
SQL> create table t1 (
2 my_date DATE
1 INSERT INTO t1
2* VALUES (TO_DATE('June One, 2000', 'Month Ddsp, yyyy')) SQL> /
VALUES (TO_DATE('June One, 2000', 'Month Ddsp, yyyy'))
ERROR at line 2:
ORA-01858: a non-numeric character was found where a numeric was expected
It looks to me like like this is due to not having a 'direct' format model for a character value for a day of the month. Month values have the "month" format model to help with this, but I can't find anything corresponding for the day of the month.
Thank you for any suggestions.
Jack Received on Tue Apr 29 2008 - 15:11:12 CDT