PGSQL转换成时间类型:20210901172134转换成2021-09-01 17:21:34
请问如何转换?
转换之后如何将时间前移8小时?
SELECT to_char(to_timestamp('20210901172134','yyyyMMddhh24miss'),'yyyy-MM-dd hh24:mi:ss')
SELECT to_char(to_timestamp('20210901172134','yyyyMMddhh24miss')- interval '8 hours','yyyy-MM-dd hh24:mi:ss')
参考https://www.cnblogs.com/mchina/archive/2013/04/15/3010418.html
https://blog.51cto.com/u_13126942/2048657 日期格式
https://blog.csdn.net/zacry/article/details/42742509?utm_medium=distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromMachineLearnPai2~default-3.essearch_pc_relevant&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromMachineLearnPai2~default-3.essearch_pc_relevant 日期计算
select '20210901172134'::timestamp-interval '8 hours'