title: HQL(hibernate) timestamp range match
body: <p>I need to write a query to get an object between a range of time, currently the query looks like this:</p>
  
  <pre><code>Timestamp from = ... 
  Timestamp to = ...
  
  getHibernateTemplate().find("from " + Person.class.getName() + " ml where ml.lastModifiedOn&gt;="+from.toString()+" and m1.lastModifiedOn&lt;=" + to.toString());
  </code></pre>
  
  <p></p>
  
  <p>However, this doesnot work for obvious reasons. How can I format the timestamp to be acceptable by the query.</p>
  
  
  org.springframework.orm.hibernate3.HibernateQueryException: unexpected token: 16 near line 1, column 123 [from Person ml where ml.lastModifiedOn>=2010-02-12 16:00:21.292 and m1.lastModifiedOn