user7732643
user7732643

Reputation:

PHP Oracle Date Error ORA-01847

I have some trouble about inserting new record to oracle from php. If I remove date column or change date column format to string i can add new records.

I make some research and try to change date format to diffent types but it didn't work.

I added my oracle table.

https://i.sstatic.net/QmYSA.jpg

And this my date format which i try to add as new record.

https://i.sstatic.net/gJUs6.jpg

$sql = 'INSERT INTO MYTABLE(ID,MYDATECOLE) '.  'VALUES(:ID,:MYDATECOLE,:MYDATECOLE)';

Upvotes: 0

Views: 83

Answers (1)

I3rutt
I3rutt

Reputation: 584

Try this:

to_date(:MYDATECOLE,'YYYY.MM.DD HH24:MI:SS')

Upvotes: 1

Related Questions