↑↓ select ↵ open ⌫ change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Functions / Data Type Formatting Functions

to_timestamp

Read the PG 18 manual

Converts string to time stamp according to the given format.

Reading PG 18current·documented in 27 of 27 versions, 7.1 to 20

Signatures & examples

to_timestamp ( text, text ) → timestamp with time zone
Converts string to time stamp according to the given format. (See also to_timestamp(double precision) in Table 9.33.)
to_timestamp('05 Dec 2000', 'DD Mon YYYY') → 2000-12-05 00:00:00-05
to_timestamp ( double precision ) → timestamp with time zone
Convert Unix epoch (seconds since 1970-01-01 00:00:00+00) to timestamp with time zone
to_timestamp(1284352323) → 2010-09-13 04:32:03+00
Version history 5
  1. 14 → 15 changed
  2. 12 → 13 changed
  3. 8.0 → 8.1 changed
  4. 7.4 → 8.0 changed
  5. 7.1 → 7.2 changed

Definition snapshot: b7bd9cda · English manual source