TO_NUMBER

TO_NUMBER(expr[,fmt])

Returns the numeric representation of expr based on the fmt string or the default for expr's data type.

If expr is already a numeric, the value is not converted. If expr is a char value, fmt can be:

% Percent sign at right of number
$ Dollar sign at left of number
B Display zero as blank
0 Display leading zeros
9 A digit position
other Delimiting character (not leading)

The default mask is as many nines (9s) as required for the number's precision and scale.

If expr is a date value, the returned numeric represents the number of days since year 0 and the portion of the last day.