当前位置:网站首页>Postgres timestamp to human eye time string or millisecond value

Postgres timestamp to human eye time string or millisecond value

2022-07-07 23:45:00 jfqqqqq

Turn the string

The way 1

SELECT to_char(create_time, 'YYYY-MM-DD hh24:mi:ss') from io_batch_time where status = 6 and gb_code = '156110000' order by create_time;


Turn millisecond

The way 1

SELECT batch_name,floor(extract(epoch from create_time)*1000),create_time from io_batch_time where status = 6 and gb_code = '156110000' order by create_time;
 

原网站

版权声明
本文为[jfqqqqq]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207072114387578.html