TO_NUMBER converts a string value to DOUBLE PRECISION.
Syntax
TO_NUMBER ( expression, pattern )
Semantics
expression |
(CHAR or VARCHAR) specifies the string to convert |
pattern |
(CHAR or VARCHAR) specifies an output pattern string using the Template Patterns for Date/Time Formatting and/or Template Patterns for Numeric Formatting. |
Notes
'\\"YYYY Month\\"'
Examples
> SELECT TO_CHAR(1999, 'rn'), TO_NUMBER('mcmxcix', 'rn');
to_char | to_number
-----------------+-----------
mcmxcix | 1999