oracle 在sql中拼接时间
<isNotEmpty prepend="and" property="startDate"> to_date(rs.count_date, 'YYYY-MM-DD hh24:mi:ss') >= TO_DATE(#startDate#||' 00:00:00', 'YYYY-MM-DD hh24:mi:ss') </isNotEmpty> <isNotEmpty prepend="and" property="endDate"> to_date(rs.count_date, 'YYYY-MM-DD hh24:mi:ss') <= TO_DATE(#endDate#||' 23:59:59', 'YYYY-MM-DD hh24:mi:ss') </isNotEmpty>
<isNotEmpty prepend="and" property="startDate"> trunc(to_date(#startDate#, 'yyyy-MM-dd'), 'month') <= to_date(ro.sale_time, 'YYYY-MM-DD hh24:mi:ss') and to_date(ro.sale_time, 'YYYY-MM-DD hh24:mi:ss') <= to_date(TO_CHAR(last_day(sysdate),'YYYY-MM-DD')||' 23:59:59', 'YYYY-MM-DD hh24:mi:ss') </isNotEmpty> ) as MOUTH_SALE_COUNT,
无为而治