Hi Jesse,
Thanks for your posting.
I got it right, it is the seconds that was casuing the problem.
Code:
Following is the working code
Query sqlQuery = session.createQuery
(" from SleepingRoomProductInv srpinv where " +
"to_date(to_char(srpinv.propPrdtUseStartDtme, 'MM/DD/YYYY HH:MI:SS'), 'MM/DD/YYYY HH:MI:SS') " +
" = to_date(to_char(:startDate,'MM/DD/YYYY HH:MI:SS'), 'MM/DD/YYYY HH:MI:SS')");
Calendar cal = getCalendar(2005,Calendar.APRIL,28,11,7,37);
java.sql.Date dt = new java.sql.Date(cal.getTimeInMillis());
sqlQuery.setTimestamp("startDate",dt);
//Get the List of Data.
List result = sqlQuery.list();