some_date + interval '2' hour
some_date + interval '30' minute
some_date + interval '5' second
some_date + interval '2' day
还可以将多个单元组合成一个表达式:
some_date + interval '2 3:06' day to minute
即将日期值添加2天,3小时和6分钟
--17-6月 -20 07.00.00.000000000 上午
select * from goods_order where id = 163
and to_char(subscribestarttime + interval '10' minute, 'yyyy-MM-dd hh24:mi:ss') >= '2020-06-17 07:10:00'
and to_char(subscribestarttime - interval '5' minute, 'yyyy-MM-dd hh24:mi:ss') <= '2020-06-17 07:10:00'