HQL query to select data between two dates not returning any record
问题 ReportView I'm getting values of Dates from JavaFX DatePicker objects tDateFrom, tDateTo. I've tried, (1) List list = session.createQuery("from ReportView where date between :stDate and :edDate") .setTimestamp("stDate", Date.from(Instant.from(tDateFrom.getValue().atStartOfDay(ZoneId.systemDefault())))) .setTimestamp("edDate", Date.from(Instant.from(tDateTo.getValue().atStartOfDay(ZoneId.systemDefault())))) .list(); (2) SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");