Hey Im new to java.I'm doing a project from java.since i'm new to java i have some problem with java db data retriving.Please guys help me

I have date field in my javadb.I have to retrive data from the table via date field.

Date date = jCalendar1.getDate();
session = HibernateUtil.getSessionFactory().getCurrentSessio n();
session.beginTransaction();
List result = session.createQuery("from Presentation.Appoinment where location=\'"+date+"\'").list();

for(Object a:result){
Appoinment app=(Appoinment)result;
JOptionPane.showMessageDialog(this, app.getLocation());
}

session.getTransaction().commit();
HibernateUtil.getSessionFactory().close();



but code won't work.I have tried to insert differet colum other that date to quary then the code will work.Please help me on this guys