SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");yyyy-MM-dd hh:mm:ss中只有MM(表示月)是大写,其他都是小写,否则会报Illegal pattern character ‘Y‘。
错误Illegal pattern character错误
原文:http://6883741.blog.51cto.com/6873741/1565538