I want to compare two date values in Java
Date date1=10-Oct-2014 00:00:00(value fetched from DB)
Date date2=10-Oct-2014 00:00:00(value fetched from DB)
How do I convert this date values into String format in Java so that I cant compare them or else is there any way I can compare these dates.