I guess your NLS settings in database aren't exactly USA friendly (as I
have mine set to Slovakia)
but error was gone when I did something like this
SELECT TO_CHAR(TO_DATE('13/11/92 09:56 AM','DD/MM/YY HH:MI AM',
'NLS_DATE_LANGUAGE = American'),'DD.MM.YYYY HH24:MI') t1
, TO_CHAR(TO_DATE('13/11/92 09:56 PM','DD/MM/YY HH:MI AM',
'NLS_DATE_LANGUAGE = American'),'DD.MM.YYYY HH24:MI') t2
, TO_DATE('13/11/92 09:56 AM','DD/MM/YY HH:MI AM',
'NLS_DATE_LANGUAGE = American') v1
, TO_DATE('13/11/92 09:56 PM','DD/MM/YY HH:MI AM',
'NLS_DATE_LANGUAGE = American') v2
FROM DUAL
;
without NLS its error, for default NLS of yours does not support the
notation (I guess)
regards
hoppo
On 17. 4. 2012 10:48, happytoday wrote:
I tried to fix that error a lot :
('ANNIE',TO_DATE('13/11/92 10:56 PM','DD/MM/YY HH:MI PM'))
*
ERROR at line 3:
ORA-01855: AM/A.M. or PM/P.M. required
After executing :
INSERT INTO Birthdays_tab (bname, bday) VALUES
('ANNIE',TO_DATE('13/11/92 10:56 PM','DD/MM/YY HH:MI PM'));
--
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to Oracle-PLSQL@googlegroups.com
To unsubscribe from this group, send email to
oracle-plsql-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en