GET_IDCARD_AGE

Updated at:

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