这样不行吗?
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')

解决方案 »

  1.   

    试试这样?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
      

  2.   

    select * from t_order t where t.pay_date > trunc(t.order_date+1)+18/24;