17,082
社区成员
发帖
与我相关
我的任务
分享
select *
from t_order t
where t.pay_date >
(to_date(to_char(t.order_date / (1000 * 60 * 60 * 24) + 1 +
to_date('1970-01-01 08:00:00',
'YYYY-MM-DD HH:MI:SS'),
'YYYY-MM-DD') || ' 18:00:00',
'YYYY-MM-DD HH24:MI:SS') -
to_date('1970-01-01 08:00:00', 'YYYY-MM-DD HH:MI:SS')) * 24 * 60 * 60 * 1000
select * from t_order t where t.pay_date > to_date(to_char(t.order_date+1,'yyyymmdd')||' 18:00:00','yyyymmdd hh:24:mi:ss')