Follow these steps:
- Convert the 2 Strings to
Date
objects using theSimpleDateFormat
. For more details on the conversion, you can refer this post.
Example:Date date = new SimpleDateFormat(yourFormat).parse(dateString);
- Now compare the 2
Date
objects using theDate#after()
method.