Hi
ia have the table room_booking and the value is stored in the string formate("dd/mm/yyyy e.g 04/07/2008")
i want to retrive the value wich is equal to today can you pls help in solving the problem
i have the compareResult1 method
public static int getCompareResult1(String date) throws ParseException{
DateFormat df = new SimpleDateFormat("dd/MM/yy
yy", Locale.getDefault());
df.setLenient ( false );
Date d1 = df.parse(date);
Date today = new Date();
int relation;
if (d1.equals(today))
relation = 0;
else if(d1.before(today))
relation = -1;
else
relation = 1;
return relation;
}
}
when i call this in my jsp
Start Free Trial