函数
记住年月日时分秒的模式字符串:YYYY-MM-DD HH24:MI:SS
日期 --> 字符串 to_char(date, formatString)
select to_char(now(), 'YYYY-MM-DD HH24, MI:SS')
字符串 --> 日期 to_date('dateString', 'formatString')
select to_date('2021-12-18 22:24:15', 'YYYY-MM-DD HH24:MI:SS')
ref
官网链接 https://www.postgresql.org/docs/12/functions-formatting.html
注意:本文归作者所有,未经作者允许,不得转载