title: HQL query using a date column
body: <p>I am trying to create a query that will return a List of Person objects based on if the createDate field falls after a passed string that represents a date.</p>
  
  <p>My createDate fields is mapped like this in my Person class</p>
  
  <pre><code>@Basic(optional = false)
  @Column(name = "CREATE_DATE")
  @Temporal(TemporalType.DATE)
  private Date createDate;
  </code></pre>
  
  <p>My function to find all person results after a date looks like this.</p>
  
  <pre><code>public List&lt;Person&gt; searchDate(String startDate) {
  
       Session session = getSessionFactory().openSession();
  
       String s_query = "FROM Person as p WHERE p.createDate &gt;= :date";
       Query query;
       DateFormat df = new SimpleDateFormat('dd-MMM-yy');
  
       try {
          Date dt = df.parse(startDate);
          query = session.createQuery(s_query).setDate("date", dt);
  
       } catch(ParseException e){} 
  
       return (List&lt;Person&gt;)query.list();
  
  }
  </code></pre>