select
aa,
to_char(aa,'HH24:mi:ss'),
case when to_char(aa,'HH24:mi:ss')>='00:00:00' and to_char(aa,'HH24:mi:ss')<= '08:15:00'
then to_char(add_days(aa,-1),'yyyy-MM-dd')
else to_char(aa,'yyyy-MM-dd')
end as aa_new
from (
select '2022-01-03 08:10:12' aa from dummy
union all
select '2022-01-03 14:10:12' aa from dummy
union all
select '2022-01-09 08:10:12' aa from dummy
union all
select '2022-01-09 08:15:12' aa from dummy
union all
select '2022-01-10 09:10:12' aa from dummy
)作者: yh_5a4SMi0A 时间: 2022-5-25 14:48
将时间总体后移八小时可解决此场景。作者: speedy 时间: 2022-5-25 15:00
好的问题已经解决了吗作者: yh_5a4SMi0A 时间: 2022-5-26 10:52