转换成date,然后使用下面的方法:
public int compareTo(Date anotherDate)
Compares two Dates for ordering. Parameters:anotherDate - the Date to be compared. 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 argume
public int compareTo(Date anotherDate)
Compares two Dates for ordering. Parameters:anotherDate - the Date to be compared. 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 argume
Date d=formatter.parse(datestring);