RPAD数值

问题描述 投票:0回答:1

这在Oracle中工作正常,但在Postgres中不起作用。 postgres是否允许填充数字零?

RPAD(REPLACE(CAST(CEIL(MOD(columntimesec, 60)) / 100 AS VARCHAR(3)) , '.','0:'),4,0)

这有效,但是我想用数字填充

RPAD(REPLACE(CAST(CEIL(MOD(columntimesec, 60)) / 100 AS VARCHAR(3)) , '.','0:'),4,'0')
postgresql
1个回答
0
投票

如果需要在hh:mi:ss中查看时间,则可以考虑使用

© www.soinside.com 2019 - 2024. All rights reserved.