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=#select@H_301_39@to_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
)
原文链接:https://www.f2er.com/postgresql/195200.html