====== 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|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 Boolean (B)]], [[iconv_date_d|IConv Date (D)]]; [[iconv_datetime_dt|IConv DateTime (DT)]]; [[iconv_masked_decimal_mc_md|IConv Masked Decimal (MD), (MC)]]; I[[iconv_masked_scientific_ms|Conv Masked Scientific (MS)]]; [[iconv_mx_hex_mo_mb|IConv MX, HEX, MO, MB]]; [[iconv_time_mt|IConv Time (MT)]]; [[iconv_variable_binary_vb|IConv Variable Binary (VB)]]; [[oconv|OConv()]], [[iconv_encrypt_format|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")