//这样写小时是24小时制
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//12小时制
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
转换格式是区分大小写的
//这样写小时是24小时制
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
//12小时制
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");