Returns the gender extracted from a Chinese ID card number. Valid return values are M (male) and F (female).
Syntax
get_idcard_sex(<idcardno>) → STRING
Parameters
idcardno: required. A 15-digit or 18-digit ID card number of the STRING type. The function validates the ID card number against the province code and the check digit (last digit). If validation fails, the function returns null.
Return value
Returns a value of the STRING type. Returns null if the input is null or if the ID card number fails validation.
Related functions
For the full list of built-in functions, see Other functions.
该文章对您有帮助吗?