Java tutorial
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static boolean isDateAfter(String curdate, String dob) { try { SimpleDateFormat df = new SimpleDateFormat("dd-MM-yyyy"); Date date1 = df.parse(curdate); Date startingDate = df.parse(dob); if (startingDate.after(date1)) return true; else return false; } catch (Exception e) { return false; } } }