Use this function to remove formatting from a specified string and return the result.
DeFormat (String, FieldType, Format)
Parameter |
Description |
String |
Enter a valid string of formatted text. The default is the value of current field text. |
FieldType |
Enter the field type indicator used to format the first parameter. The default is the value of current field type. |
Format |
Enter the format of the first parameter. This is the field format entered in the Properties window. The default is the value of current field format. |
Some field types do not require format strings to accomplish deformatting. Numeric fields for example, ignore the format specified when deformatting. Numeric fields retain the "-" (negative) and "." (decimal) characters. If these characters were removed during deformatting a completely different value would result.
Here are some examples:
Function |
Result |
|
DeFormat ("1,234.89", "n") |
"1234.89" |
Deformat removes commas but retains decimal points for numeric fields. |
DeFormat ("ABC.123.DEF", "C", "3,.123.") |
"ABCDEF" |
Deformat removes the custom format characters (.123.) after the third character, which were previously added to the string. |
DeFormat ("$$$$$$11,980.00", "n") |
11980.00 |
Deformat removes the "$" characters and commas but retains decimal points for a numeric field. |
© Copyright 2014, Oracle and/or its affiliates. All rights reserved. Legal notices.