↑↓ 选择↵ 打开⌫ 切换范围完整搜索

PG.CENTER 连接 PostgreSQL 文档、百科与生态知识。由 Pigsty 维护。

Wiki / 函数

to_timestamp

根据给定的格式将字符串转换为时间戳。(也请参见表 9.33 中的 to_timestamp(double precision)。)

英文手册覆盖始于 PostgreSQL 7.1. 来源历史与运行验证各自保留独立版本边界。

当前阅读 PG 19·选择有来源记录的版本

group
formatting
group label
数据类型格式化函数
lang
en
layout
table-new
pages
functions-formatting.html, functions-datetime.html
prose only
false

版本定义 PG 19

根据给定的格式将字符串转换为时间戳。(也请参见表 9.33 中的 to_timestamp(double precision)。)
to_timestamp ( text, text ) → timestamp with time zone
根据给定的格式将字符串转换为时间戳。(也请参见表 9.33 中的 to_timestamp(double precision)。)
to_timestamp ( double precision ) → timestamp with time zone
将 Unix 纪元时间(自 1970-01-01 00:00:00+00 起的秒数)转换为带时区的时间戳

函数签名与重载

to_timestamp ( text, text ) → timestamp with time zone → timestamp with time zone
根据给定的格式将字符串转换为时间戳。(也请参见表 9.33 中的 to_timestamp(double precision)。)
to_timestamp ( double precision ) → timestamp with time zone → timestamp with time zone
将 Unix 纪元时间(自 1970-01-01 00:00:00+00 起的秒数)转换为带时区的时间戳

比较版本

完整来源事实

documentation revision

{"inputs":[{"file":"functions-datetime.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"b7a6cb5aaa8097293830b1e09beb16b975d72dbe156b9901e6f34ba0e1dd8ceb","version":"19rc2"},{"file":"functions-formatting.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"52728f3283d72bcfef41d41503c400fee399aa74096f9b623e16c37be7318bdf","version":"19rc2"},{"file":"functions-datetime.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"c18874697badf3f08c76d8b4453195fcca4140306821e183775ec45771cbdee1","version":"19rc2"},{"file":"functions-formatting.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"69a46e4111b852b8360032b8945204ef017a0b0c5d17b091f70a03df906fab99","version":"19rc2"}],"release":"19rc2","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"}

来源引用

完整定义与证据 JSON

定义来源

center · PostgreSQL 19 · wiki-repair-20261023:f9872c725984ea68da8c7a2ef4a5ee1287aec1d65e9e170b4b8d500620fae724

正文语言: zh-Hans · wiki-repair-20261023:f9872c725984ea68da8c7a2ef4a5ee1287aec1d65e9e170b4b8d500620fae724