由oracle转access后,发现查询某段时间时报错,折腾了一下午了,终于出来了,共享一下:
public ArrayList queryVO_DBSByDate(String findDate00, String findDate24) throws ParseException {
// return (ArrayList) super
// .queryList("from VO_DBS v where v.cDate between to_date('"
// + findDate00
// + "','YYYY-MM-DD HH24:MI:SS') and to_date('"
// + findDate24 + "','YYYY-MM-DD HH24:MI:SS')");
return (ArrayList) super
.queryList("from VO_DBS v where v.cDate > '"+ findDate00+ "'and v.cDate<'" + findDate24
+ "'");
}
以上,注释掉的是使用于oracle的日期段查询,其下面的是适用于ACCESS的。