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.

 

 

The standard conversion codes are:

Base64B64
BooleanB
ConcatenationC
DatesD
GroupG
IntegerIS, IL
LengthL
RadixMB, MO, MX
RadixMCDX, MCXD
CharacterMCx
Masked DecimalMD, ML, MR
TimesMT
Pattern matchingP
Range checkingR
SubstitutionS
Text substringTm,n
TranslationTfile
User definedU
Fields<f,v,s>