COUNTRY_TO_ALPHA3¶
Description¶
COUNTRY_TO_ALPHA3 converts an ISO 3166-1 alpha-2 country code (2 letters) to the corresponding ISO 3166-1 alpha-3 country code (3 letters).
Returns unknown if the input is not a recognised alpha-2 code.
Syntax¶
Returns: A 3-letter alpha-3 country code string, or unknown if the input is unrecognised.
Example¶
This returns 'CHE'.
This returns 'DEU'.
This returns unknown — 'XX' is not a valid ISO country code.
Example in context¶
Converts the 2-letter nationality stored on a person to its 3-letter equivalent, e.g. for use in downstream systems or document generation that requires alpha-3 codes.