控制PSQL的时间戳timestamp精度
问题:
select now()
结果:
需求:只保留到秒的级别:
select now()::timestamp (0) // 返回时间类型
或
select ('now'::text)::timestamp(0) without time zone //返回文本类型
结果:
控制PSQL的时间戳timestamp精度
问题:
select now()
结果:
需求:只保留到秒的级别:
select now()::timestamp (0) // 返回时间类型
或
select ('now'::text)::timestamp(0) without time zone //返回文本类型
结果: