TO_CHAR function (extension)
Syntax
TO_CHAR ( expression [ , format_string ] )
Description
The scalar function TO_CHAR converts the given expression to character form and returns the result. The primary use for TO_CHAR is to format the output of date-time expressions through the format_string argument.
Arguments
FairCom DB SQL ignores the format string if the expression argument does not evaluate to a date or time.
Example
SELECT C1 FROM T2;
C1
--
09/29/1952
1 record selected
SELECT TO_CHAR(C1, 'Day, Month ddth'),
TO_CHAR(C2, 'HH12 a.m.') FROM T2;
TO_CHAR(C1,DAY, MONTH DDTH) TO_CHAR(C2,HH12 A.M.)
--------------------------- ---------------------
Monday , September 29th 02 p.m.
1 record selected
Notes