The GET_IDCARD_AGE function of MaxCompute checks the validity of the ID card and returns the current age based on the ID card number. This topic describes the syntax and parameters of the GET_IDCARD_AGE function.
Syntax
get_idcard_age(<idcardno>)
Parameters
idcardno: required. A 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, null is returned.
Return value
A value of the BIGINT type is returned. If the input parameter is set to null, the return value is null.
References
For more information, see Other functions.
If the GET_IDCARD_AGE function does not meet your requirements, MaxCompute also allows you to use user-defined functions (UDFs). For more information about UDFs, see Overview.
For more information about common errors and FAQ about built-in functions of MaxCompute, see the following topics: