I am facing the below oracle error for the query
Insert Query:
INSERT INTO WINBACK_REFERRAL_CODES
(REFERRAL_CODE, IS_DELETED, CREATED_BY,
CREATED_DT,
MODIFIED_BY,
MODIFIED_DT, DELETED_BY, DELETED_DT)
values
('sfsdfsd', 'N', 'LA\a03789',
To_date('4/18/2013 3:57:47 PM','MM/DD/YYYY HH12:MI:SS AM'),
'',
To_date('','MM/DD/YYYY HH12:MI:SS AM'),
'',
To_date('4/18/2013 3:57:47 PM','MM/DD/YYYY HH12:MM:SS AM'));
ERROR MESSAGE:
Can someone please help me resolving this issue. I am trying to insert date and time in this format 4/18/2013 3:57:47 PM to oracle DB.
To_date('4/18/2013 3:57:47 PM','MM/DD/YYYY HH12:MM:SS AM')
should be rewritten to To_date('4/18/2013 3:57:47 PM','MM/DD/YYYY HH12:MI:SS AM')
. Note the change from MM to MI.