ORA-01810 格式代码出现两次

这个错误的原因是使用了两次MM

to_date(‘YYYY-MM-DD HH:MM:SS’)
需要把分钟的MM改成MI

to_date(‘YYYY-MM-DD HH:MI:SS’)
这样可能会出现小时变成了上下午的12小时格式,所以可以给小时设置成24小时格式

to_date(‘YYYY-MM-DD HH24:MI:SS’)

//ref 黑色头发:http://heisetoufa.iteye.com

This entry was posted in Computer, Java. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s