您的位置:首页 > 博客中心 > 数据库 >

postgreSQL数据库to_timestamp和to_date的区别

时间:2022-03-15 18:27

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

本类排行

今日推荐

热门手游