Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

oci_execute(): ORA-01810: format code appears twice in

//Using oci8 to connect to Oracle Database.
//oci_execute(): ORA-01810: format code appears twice 

SQL> SELECT  TO_TIMESTAMP('20151206 00:00:00', 'yyyy/mm/dd hh:mm:ss') FROM dual;
SELECT  TO_TIMESTAMP('20151206 00:00:00', 'yyyy/mm/dd hh:mm:ss') FROM dual
                                          *
ERROR at line 1:
ORA-01810: format code appears twice
  
//Reason for error is that 'mm' appear in ('yyyymmdd') and ('hh:mm:ss') while 
//minutes are denoted as 'mi and 'mm' as months.
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #format #code #appears
ADD COMMENT
Topic
Name
4+7 =