In PHP, date('Y-m-d H:i:s')
gives result like '2017-02-17 23:10:00'
format.
Now, I want to save the result in ORACLE 10g. I am using Oracle 10g Xpress Edition.
Now, I am trying to save the Data like this.
$sql = "INSERT INTO tbl_language VALUES
(1, 'Hindi', TO_DATE('".$time."','yyyy-mm-dd hh24:mi:ss'))";
Where $time = date('Y-m-d H:i:s');
The date value is getting saved as 12-Feb-17
.
How can I get the date data saved in the desired form?