开发者

problem in date column with hibernate hql query

开发者 https://www.devze.com 2023-03-01 06:16 出处:网络
i hav ahql query..it gets the data used between two dates..i wriiten a query like this from com.cod.model.Billing where datecolumn between \'2011-4-4\' and \'2011-4-20\'

i hav a hql query..it gets the data used between two dates..i wriiten a query like this

from com.cod.model.Billing where datecolumn between '2011-4-4' and '2011-4-20'

but i didn't get any results from this query ..i checked out this query in mysql with sql query.there it's workng fine..but if i write same query in hql it returns null results can any one say what's the problem in my q开发者_开发百科uery.thanx in advance


The dates mentioned have to be of the type java.util.Date and not String

0

精彩评论

暂无评论...
验证码 换一张
取 消