0
工作时与串测试休眠条件查询不注日期
criteria.add(Restrictions.eq("name", "John"));
然而,当我与日期测试它下面的代码行完美的作品返回错误 这行代码返回错误
criteria.add(Restrictions.eq(currentDate,dd));
我这是怎么得到的currentdate
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
Calendar cal = Calendar.getInstance();
String currentDate=dateFormat.format(cal.getTime());
我印刷的currentdate和DD和下面是在控制台输出与所述误差
当前日期沿着:2014年2月17日 DD:2014年2月16日
JKInsrException: - >无法解析属性:2014年2月17日的:com.java.JKInsr.Contact
非常感谢......它为我工作。我搞砸了语法。 –