Exception not a valid month

oracle中的to_date('date','pattern')

其中的date和pattern格式应该要一样

SELECT to_date('2016-03-29 00:00:00','yyyy-MM-dd hh24:mi:ss') from dual 这样是可以的,

但是如果是

SELECT to_date('2016-03-29 00:00:00','yyyyMMdd hh24:mi:ss') from dual

就是不行的

原文地址:https://www.cnblogs.com/lijiale/p/5341025.html