This code snippet
helps to retrieve a particular date without its time portion.
public static Date getDate(Date inDate){ if(inDate != null){ Calendar objCalendar = new GregorianCalendar(); objCalendar.setTime(inDate); objCalendar.set(Calendar.HOUR_OF_DAY, 0); objCalendar.set(Calendar.MINUTE, 0); objCalendar.set(Calendar.SECOND, 0); objCalendar.set(Calendar.MILLISECOND, 0); return (objCalendar.getTime()); }else{ return null; } }