Well if the date is just a string then just use
java.lang.String.split(). ie.
String dt = "01-23-2004";
String dateParts[] = dt.split("-");
String month = dateParts[0];
String day = dateParts[1];
String year = dateParts[2];
If you're using an actual "Date" class like java.util.Date or
java.sql.Date then you can use the java.util.Calendar class to get the
pieces of the date. ie.
Date dt;
.
.
.
Calendar cal = Calendar.getInstance();
cal.setTime(dt);
int month = cal.get(Calendar.MONTH) + 1;
int day = cal.get(Calendar.DATE);
int year = cal.get(Calendar.YEAR);