I have two Date objects with the below format.
Date
SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\'T\'HH:mm:ss\"); String
An Alternative is....
Convert both dates into milliseconds as below
Date d = new Date(); long l = d.getTime();
Now compare both long values