0

TO_DATE function couldn't prepare statement. Where is mistake in this query?

UPDATE Employees SET BirthDate = TO_DATE('01042015233514','DD.Month.YYYY HH:MI:SS'), LastName = 'YURTCU' WHERE FirstName = 'SENEM';

Please help me. Thank You!

4

1 回答 1

1

正如我看到您给定的输入字符串和日期模式不匹配,对于您给定的字符串(01042015233514),您必须使用DDMMYYYYHH24MISS格式将其转换为日期:

select TO_DATE('01042015233514','DDMMYYYYHH24MISS') from dual

输出:

01-APR-15 --(in your default format)
于 2015-04-02T14:04:12.880 回答