posted 15 years ago
So, you have those dates as strings? First, you'll have to convert them to java.util.Date objects. You can do that using java.text.SimpleDateFormat (read the API documentation for that class).
But if you don't know what the format of the second date is, it is going to be very hard. The computer can't magically figure that out for you... Note that dates can be written in ambiguous ways: for example, does "01/03/10" mean 1 March 2010, 3 January 2010 or maybe even 10 March 2001?
Once you have the dates as Date objects, you can use methods such as after() and before() on the Date objects (again, lookup the API documentation) to compare them.