String date = "2011-11-11";
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
try{
Date mydate = format.parse(date);
}catch(ParseException e){
e.printStackTrace();
}
时间: 2024-11-05 19:03:43
String date = "2011-11-11";
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
try{
Date mydate = format.parse(date);
}catch(ParseException e){
e.printStackTrace();
}