获取时间段内的数据hql语句报错,怎么回事,求解答!!!

2017-3-28 15:24:21

Tue Mar 14 00:00:00 CST 2017

from AySupervise a where a.hostDate between Tue Mar 14 00:00:00 CST 2017 and Sat Mar 18 00:00:00 CST 2017 and a.personId = ? order by a.hostDate desc

第一个是hostDate时间日期格式,第二个是从页面获取到的字符串时间,我自己转化成日期格式,第三个是hql语句,下面是报的错
org.springframework.orm.hibernate3.HibernateQueryException: unexpected token: Mar near line 1, column 77 [from com.sysway.supervise.entity.AySupervise a where a.hostDate between Tue Mar 14 00:00:00 CST 2017 and Sat Mar 18 00:00:00 CST 2017 and a.personId = ? order by a.hostDate desc ]; nested exception is org.hibernate.hql.ast.QuerySyntaxException: unexpected token: Mar near line 1, column 77 [from com.sysway.supervise.entity.AySupervise a where a.hostDate between Tue Mar 14 00:00:00 CST 2017 and Sat Mar 18 00:00:00 CST 2017 and a.personId = ? order by a.hostDate desc ]

你数据库的时间字段是时间格式还是字符串格式,还有你的时间格式引的是java util 还是sql的?