to_char ( timestamp, text ) → textConverts time stamp to string according to the given format.
to_char(timestamp '2002-04-20 17:31:12.66', 'HH12:MI:SS') → 05:31:12
Converts time stamp to string according to the given format.
to_char ( timestamp, text ) → textConverts time stamp to string according to the given format.
to_char(timestamp '2002-04-20 17:31:12.66', 'HH12:MI:SS') → 05:31:12
to_char ( timestamp with time zone, text ) → textConverts time stamp to string according to the given format.
to_char(timestamp '2002-04-20 17:31:12.66', 'HH12:MI:SS') → 05:31:12
to_char ( interval, text ) → textConverts interval to string according to the given format.
to_char(interval '15h 2m 12s', 'HH24:MI:SS') → 15:02:12
to_char ( numeric_type, text ) → textConverts number to string according to the given format; available for
integer, bigint, numeric, real, double precision.to_char(125, '999') → 125
to_char(125.8::real, '999D9') → 125.8
to_char(-125.8, '999D99S') → 125.80-
Definition snapshot: 2026-09-14T13:14:25.684213+00:00@99e6866c · English manual source