2013-07-23 101 views

回答

3

使用SimpleDateFormat

SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yy"); 
String stringWithDate = "16/07/13"; 
Date theDate = sdf.parse(stringWithDate); 
//store theDate variable in your database... 

注意SimpleDateFormat#parse拋出ParseException