date_part ( text, timestamp ) → double precision → double precisionGet timestamp subfield (equivalent to
extract); see Section 9.9.1Get timestamp subfield (equivalent to extract); see Section 9.9.1
English manual coverage begins with PostgreSQL 7.1. Source history and runtime observations have their own recorded version boundaries.
Reading PG 18·Select a recorded version
extract); see Section 9.9.1date_part ( text, timestamp ) → double precision → double precisionGet timestamp subfield (equivalent to
extract); see Section 9.9.1date_part ( text, interval ) → double precision → double precisionGet interval subfield (equivalent to
extract); see Section 9.9.1date_part('field', source)Note that here the field parameter needs to be a string value, not a name. The valid field names for date_part are the same as for extract. For historical reasons, the date_part function returns values of type double precision. This can result in a loss of precision in certain uses. Using extract is recommended instead.{"inputs":[{"file":"functions-datetime.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"8c5053713aeaacfbe4cb00effc61f10d457c98b2a29c724b10b93819a087ea95","version":"18.7"},{"file":"functions-datetime.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"c3efdd1c3df6795c73dfea2ecec17ca31ff37da23d758083a581d75445851f0c","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"}Full definition and evidence JSON
center · PostgreSQL 18 · wiki-repair-20261023:d27ecdb70ee2703a71214aee024a074c078ec812ad16bfcfd1c494bee0d52899
Text language: en · wiki-repair-20261023:d27ecdb70ee2703a71214aee024a074c078ec812ad16bfcfd1c494bee0d52899