All Products
Search
Document Center

MaxCompute:GET_IDCARD_SEX

Last Updated:Jul 24, 2023

Returns the gender based on the ID card number. Valid values: M and F. M indicates male and F indicates female.

Syntax

get_idcard_sex(<idcardno>)

Parameters

idcardno: required. The 15-digit or 18-digit ID card number of the STRING type. During calculation, the validity of the ID card is checked based on the province code and the last digit of the ID card number. If the check fails, the return value is null.

Return value

A value of the STRING type is returned. If the input parameter is set to null, the return value is null.

Related functions

For more information, see Other functions.