IConv function
Description
Converts data into the native internal OpenInsight format.
Note: In addition to the standard input conversions documented in this chapter, customized input conversions can also be written. See User-Defined Conversions.
Syntax
internal = IConv(string, conversion)
Parameters
The IConv function has the following parameters.
Parameter | Description |
---|---|
String | The value of string is the data to be converted to internal system format. String can specify a dynamic array using field marks (ASCII character 254), value marks (ASCII character 253), subvalue marks (ASCII character 252), or text marks (ASCII character 251) as delimiters. |
Conversion | Identifies the type of data conversion that you want to perform on string. If conversion is a literal value, you must put it in quotation marks. If conversion is a variable, do not enclose it in quotation marks. |
After executing an IConv conversion, you can determine the success of the conversion by checking the value of Status(). Possible values of Status() are:
Value | Description |
---|---|
0 | Successful conversion. |
1 | The data in string cannot be converted using conversion. |
2 | conversion is not a recognized conversion specification. |
See Also
IConv Boolean (B), IConv Date (D); IConv DateTime (DT); IConv Masked Decimal (MD), (MC); IConv Masked Scientific (MS); IConv MX, HEX, MO, MB; IConv Time (MT); IConv Variable Binary (VB); OConv(), IConv ENCRYPT_FORMAT
Example
* Converts 100.00 to 10000, and assigns the value to X. X = IConv(100.00, "MD2") /* Converts January 28, 2009 to internal date format, 15004, and assigns that value to D. */ D = IConv("1-28-09", "D") /* Converts 1:00 PM to internal time format, 46800, and assigns that value to T. */ T = IConv("1:00PM", "MT")