Conversion Codes

Conversion Codes

Top  Previous  Next

 

Sometimes data is not stored in the database in the same way as we would wish to present it to a user. A conversion code determines how data is translated between its internal format and the user friendly external format.

 

Although there are many conversion codes, the most important are those that handle dates, times and scaled decimal values.

 

Conversion codes appear in field 3 of a C-type, D-type or I-type dictionary item or field 7 of an A or S-type item. They determine the way in which data is converted prior to output by the query processor or when input via MODIFY or UPDATE.RECORD. Conversion codes are also used in the QMBasic ICONV() and OCONV() functions and with the query processor CONV keyword.

 

Multiple conversion codes may be applied in sequence by specifying the code as a multivalued string.

 

 

The standard conversion codes are:

BooleanB
Base64B64
Byte StringBS
ConcatenationC
DatesD
EpochE
GroupG
HTML dataHD
HTML URLHU
IntegerIS, IL
LengthL
RadixMB, MO, MX
RadixMCDX, MCXD
CharacterMCx
Masked DecimalMD, ML, MR
Packed DecimalMP
TimesMT
ThousandsMK
Roman numeralsNR
Pattern matchingP
Range checkingR
SoundexS
SubstitutionSx
Text substringTm,n
TranslationTfile
User definedU
Character encodingsXname.modes
Fields<f,v,s>