Код: Выделить всё
String date = "12/31/2012";
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd");
try {
Date parse = sdf.parse(date);
System.out.println(parse);
} catch (ParseException ex) {
ex.printStackTrace();
}
Подробнее здесь: https://stackoverflow.com/questions/144 ... at-to-date
Мобильная версия