SyntaxFix
Write A Post
Hire A Developer
Questions
You need to use a SimpleDateFormat (dd-MM-yyyy will be the format) to parse the 2 input strings to Date objects and then use the Date#before(otherDate) (or) Date#after(otherDate) to compare them.
SimpleDateFormat
dd-MM-yyyy
Date
Date#before(otherDate)
Date#after(otherDate)
Try to implement the code yourself.