Http://www.cnblogs.com/hanyun/archive/2009/05/14/1456772.html
1). When using Oracle's To_date function for date conversion, it is possible to intuitively convert in "YYYY-MM-DD HH:mm:ss" format as a format, but in Oracle it causes an error: "ORA 01810 format code two times". such as: Select To_date (' 2005-01-01 13:14:20 ', ' yyyy-mm-dd HH24:mm:ss ') from dual;
The reason is that SQL is case-insensitive, mm and mm are considered the same format code, so Oracle's SQL uses MI instead of minutes. Select To_date (' 2005-01-01 13:14:20 ', ' yyyy-mm-dd HH24:mi:ss ') from dual;
2). Another 24-hour display to use HH24
Select To_char (sysdate, ' Yyyy-mm-dd HH24:mi:ss ') from Dual;//mi is minutes
Select To_char (sysdate, ' yyyy-mm-dd HH24:mm:ss ') displays the month from dual;//mm
This article is from the "Small Li Guangzhi Blog" blog, please be sure to keep this source http://6817977.blog.51cto.com/6807977/1597112
Issues with time conversion in Oracle