title: Hibernate - filter Single Column data using date where clause
body: <p>Lets say One table ABC having two column i.e. ID &amp; CREATED_DATE</p>
  
  <p>I want to fetch those ID which is created lets say <code>'09-11-2017'</code> and <code>'09-17-2017'</code></p>
  
  <p>Below SQL query working fine but I want to implement same logic using hibernate.</p>
  
  <pre><code>select ID from ABC where between TO_DATE('09-11-2017', 'MM-DD-YYYY')  AND TO_DATE('09-17-2017', 'MM-DD-YYYY')
  </code></pre>
  
  <p>My code is not working. </p>
  
  <pre><code>public List getData(final Date startDate, final Date endDate){
  
      String sqlString = "select ID from ABC where CREATED_DATE between :startDate and :endDate";
      SQLQuery query = getSession().createSQLQuery(sqlString);
      query.setParameter(CREATED_DATE);
      return query.list();
  }
  </code></pre>