当前位置:网站首页>postgres timestamp转人眼时间字符串或者毫秒值

postgres timestamp转人眼时间字符串或者毫秒值

2022-07-07 21:52:00 jfqqqqq

转字符串

方式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;


转毫秒

方式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://blog.csdn.net/jfqqqqq/article/details/125603604