$START_DT=TO_DATE('2001/07/24-19:18:26','YYYY/MM/DD-HH24:MI:SS');

To insert this and other data into database I did:

$insert="
INSERT INTO test_db
(START_DT, AA, BB)
VALUES
(?,?,?)
";

$sth=$dbh->prepare($insert);
$sth->execute($START_DT,$AA,$BB);

The error message I got is:
DBD::Oracle::st execute failed: ORA-01843: not a valid
month (DBD ERROR: OCIStmtExecute)

What did I do wrong?

For testing, I did:
$insert = "
INSERT INTO test_db
(START_DT,AA,BB)
VALUES
(TO_DATE('2001/07/24-19:18:26','YYYY/MM/DD-HH24:MI:SS'),
'aa', 'bb')
";
$dbh->do($insert);

This worked fine.

Thanks for the help!

Qing


Reply via email to