postgreSQL数据库to_timestamp和to_date的区别

1 SELECT  to_timestamp('2020-02-27 12:12:12','yyyy-MM-dd hh24:mi:ss') ;
2 SELECT  to_date('2020-02-27 12:12:12','yyyy-MM-dd hh24:mi:ss') ;

to_timestamp返回结果:2020-02-27 12:12:12

to_date返回结果:2020-02-27

posted @ 2022-07-14 13:52  疯子110  阅读(52)  评论(0编辑  收藏  举报