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 @ 2020-03-06 23:14  于工笔记  阅读(4650)  评论(1编辑  收藏  举报