title: date in where clause --- org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: Mar
body: <p>I have date column in TrainSeat table. I want to retrieve the data using where clause.In where claue, the date condition is specified.</p>
  
  <p><code>Seats=(ArrayList&lt;TrainSeat&gt;)session.createQuery("from TrainSeat t 
  where t.train.TrainNumber="+TrainNum+"and t.date="+date+"").list();</code></p>
  
  <p>here 'date' is instance of Date datatype</p>
  
  <p>This statements gives following errors</p>
  
  <pre><code>org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: Mar near line 1, column 80 [from org.irctc.admin.TrainSeat t where t.train.TrainNumber=11007and t.date=Wed Mar 27 00:00:00 IST 2013]
  </code></pre>