SQL以时间为查询条件
时间:2021-07-01 10:21:17
帮助过:3人阅读
(!Strings.isNullOrEmpty(startDate)) {
querySql += "
and do.enter_date_time
>= to_date(
‘" + startDate + "‘,
‘yyyy-mm-dd‘) ";
}
if (!Strings.isNullOrEmpty(endDate)) {
querySql += "
and do.enter_date_time
< trunc(to_date(
‘" + endDate + "‘,
‘yyyy-mm-dd‘)
+1) ";
}
2.后台得到时间格式(endDate = new Date())
querySql += "and do.enter_date_time >= startDate ";
querySql += "and do.enter_date_time < endDate ";
SQL以时间为查询条件
标签:art div isnull and 格式 date color font 查询