I have a date on String, like this:
String date=\"25.07.2007\";
And I want to divide it to:
String day;
String month;
String yea
public class DateTest {
/**
* @param args
* @throws ParseException
*/
public static void main(String[] args) throws ParseException {
String starDate = "7/12/1995 12:00:00 AM";
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("dd/MM/yyyy");
String newDateStr = simpleDateFormat.format(simpleDateFormat.parse(starDate));
String str[] = newDateStr.split("/");
String month = str[1];
String year = str[2];
}
}