cnd
createtime <= '2017-11-27 13:25:16'
数据库对应字段
2017-11-27 13:25:17
时间转换用的这个
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return sdf.format(date);
String endTime = DateUtils.getYYYYMMDDHHmmss(end);
String startTime = DateUtils.getYYYYMMDDHHmmss(start);
Cnd cnd = Cnd.where("aa","=",appid)
.and("pid","=",pid)
.and(Cnd.exps("ip", "=", ipw).or("ipw", "=", ipw))
.and("createtime",">=",startTime)
.and("createtime","<=",endTime);
int count = dao.count(dd.class, cnd);
public static String getYYYYMMDDHHmmss(Date date){
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return sdf.format(date);
}
@wendal