GET_IDCARD_AGE
The MaxCompute GET_IDCARD_AGE function validates an ID card number and returns the age of the cardholder. This topic describes the command format and parameters of the GET_IDCARD_AGE function.
Command format
get_idcard_age(<idcardno>)Parameters
idcardno: Required. A string that represents a 15-digit or 18-digit ID card number. The function validates the ID card number based on the province code and the last check digit. If the validation fails, the function returns NULL.
Return value
Returns a BIGINT value. If the input is NULL, the function returns NULL.
References
GET_IDCARD_AGE is a miscellaneous function. For more information about functions for other business scenarios, see Other functions.
If this function does not meet your needs, you can use a user-defined function (UDF). For more information about UDFs, see Overview of MaxCompute UDFs.
For common error codes and frequently asked questions (FAQ) about MaxCompute built-in functions, see: