CONVERT (Function)


The CONVERT function is the function form of the CONVERT statement. It performs exactly the same function but may also operate on an expression rather than being restricted to variables.

 

COMMAND SYNTAX

CONVERT(expression1, expression2, expression3)

 

SYNTAX ELEMENTS

expression1 is the string to which the conversion will apply.
expression2 is the list of all characters to translate in expression1.
expression3 is the list of characters that will be converted to.

For Prime, Universe and Unidata emulations:
expression1 is the list of all characters to translate in expression1.
expression2 is the list of characters that will be converted to.
expression3 is the string to which the conversion will apply.

 

NOTES

See also the CONVERT statement.

 

EXAMPLES

Value = CONVERT(Value, "#.,", "$,.")
Value = CONVERT(PartCode, "abc", "ABC")
Value = CONVERT(Code, "1234567890", "0987654321")


jBC