日期获取
仅供参考:
--获取年月
--2020-07
select to_char('2020-07-01 12:55:00'::TIMESTAMP,'yyyy-mm');
--获取年月日
--2020-07-01
select to_char('2020-07-01 12:55:00'::TIMESTAMP,'yyyy-mm-dd');
--获取当前月份
--7.0
select extract(month from '2020-07-01 12:55:00'::TIMESTAMP);
or
select extract(month from now());
--获取下月的月份
--8.0</