例如将11/28/2016变换为2016-11-28
try {
String a='11/28/2016 ';
simpledateformatdf=newsimpledateformat (yyyy-mm-DD );
dated=newdate(a );
strings=df.format(d ); //第一种方法
System.out.println (转换后的日期=' s );
Java.SQL.datedd=new Java.SQL.date (d.gettime ) );
System.out.println (转换后的日期=' dd );//第二种方法
}catch(exceptione ) {
system.out.println(ASDF );
e .打印任务跟踪(;
}