FunctionReturn TypeDescriptionExample
to_char
(timestamp, text
)
textconvert time stamp to string
to_char(current_timestamp, 'HH12:MI:SS')
to_char
(
interval, text
)
textconvert interval to string
to_char(interval '15h2m12s', 'HH24:MI:SS')
to_char
(
int, text
)
textconvert integer to string
to_char(125, '999')
to_char
(
double
precision
, text
)
textconvert real/double precision to string
to_char(125.8::real, '999D9')
to_char
(
numeric, text
)
textconvert numeric to string
to_char(-125.8, '999D99S')
to_date
(text, text
)
dateconvert string to date
to_date('05Dec2000', 'DDMonYYYY')
to_number
(
text, text
)
numericconvert string to numeric
to_number('12,454.8-', '99G999D9S')
to_timestamp
(
text, text
)
timestamp with time zoneconvert string to time stamp
to_timestamp('05Dec2000', 'DDMonYYYY')
to_timestamp
(
double precision
)
timestamp with time zoneconvert Unix epoch to time stamp
to_timestamp(1284352323