Parse the string into date, then compare using compareTo
, before
or after
Date d = new Date();
d.compareTo(anotherDate)
i.e
Date date1 = new SimpleDateFormat("MM/dd/yyyy").parse(date1string)
Date date2 = new SimpleDateFormat("MM/dd/yyyy").parse(date2string)
date1.compareTo(date2);
Copying the comment provided below by @MuhammadSaqib to complete this answer.
Returns the value 0 if the argument Date is equal to this Date; a
value less than 0 if this Date is before the Date argument, and a
value greater than 0 if this Date is after the Date argument. and
NullPointerException - if anotherDate is null.
javadoc for compareTo
http://docs.oracle.com/javase/6/docs/api/java/util/Date.html#compareTo(java.util.Date)