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!

ORA-01855: AM/A.M. or PM/P.M. required

Mostafa AbolaynainNov 11 2008 — edited Nov 12 2008
Hi all

When i execute the following sql statment :

SELECT TO_DATE('12/31/1969 5:00:00 PM','MM/DD/YYYY HH:MI:SS PM ') FROM DUAL;


It gives the error message : ORA-01855: AM/A.M. or PM/P.M. required




But when i write it using HH24 format like the following :

SELECT TO_DATE('12/31/1969 17:00:00','MM/DD/YYYY HH24:MI:SS ') FROM DUAL;

It's OK ?

Why using the Meridian format AM or PM for the date value always give this erro ?

Thanks

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 10 2008
Added on Nov 11 2008
18 comments
23,318 views