加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

postgreSQL中含有PM/AM时间格式转换to_timestamp

发布时间:2020-12-13 17:19:00 所属栏目:百科 来源:网络整理
导读:PostgreSQL帮助文档 9.8. Data Type Formatting Functions The PostgreSQL formatting functions provide a powerful set of tools for converting various data types(date/time,integer,floating point,numeric) to formatted strings and for converting

PostgreSQL帮助文档

9.8. Data Type Formatting Functions
The PostgreSQLformatting functionsprovide a powerful set of tools for converting various data types(date/time,integer,floating point,numeric)to formatted strings and forconverting from formattedstringstospecific data types.

GPSData=#selectto_timestamp('Sep 28 201010:51:46:163PM','Mon DD YYYYHH24:MI:SS:MS');

to_timestamp

----------------------------

2010-09-2822:51:46.163+08

(1行记录)

GPSData=#selectto_timestamp('Sep 28 201010:51:46:163AM','Mon DD YYYYHH24:MI:SS:MSAM');

2010-09-2810:51:46.163+08

)

GPSData=#select to_timestamp('Sep 28 201010:51:46:163PM','Mon DD YYYYHH12:MI:SS:MSPM');

to_timestamp

----------------------------

2010-09-2822:51:46.163+08

(1行记录)

to_timestamp('Sep 28 2010AM','Mon DD YYYYHH12:MI:SS:MSAM');

10:51:46.163+08

)

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读