In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
 
            
                     
                
2025-10-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The first generation of IDCARD is 15-digit numbers, and the second generation is 18-digit numbers.
The meaning of the new 18-digit IDCARD number: 1-2 digits code for provinces, autonomous regions and municipalities directly under the Central Government
3-4 prefecture-level city, league and autonomous prefecture codes
5-6 county, county city and district codes
7-14 date of birth, for example, 19670401 represents April 1, 1967
15-17 digits are serial numbers, of which 17 males are odd and females are even.
18 bits are parity codes, 0-9 and X, which are randomly generated by the formula.
Meaning of 15-digit IDCARD number: 1-2 digits code of province, autonomous region and municipality directly under the Central Government
3-4 prefecture-level city, league and autonomous prefecture codes
5-6 county, county city and district codes
7-12-digit date of birth, for example, 670401 represents April 1, 1967, which is the first difference from an 18-digit number
13-15 digits are serial numbers, of which 15 males are singular and females are even.
The second difference from the 18-digit * * symbol: there is no CAPTCHA for the last digit
To obtain the age information of the user from IDCARD, it is necessary to verify the validity of IDCARD.
-- determine whether it is a number, return True,FalseCREATE OR REPLACE FUNCTION DT_ISNUMBER (P_IN VARCHAR2) RETURN BOOLEAN AS I NUMBER; BEGIN I: = TO_NUMBER (P_IN); RETURN TRUE;EXCEPTION WHEN OTHERS THEN RETURN FALSE;END;-- determine whether it is a date, return True,FalseCREATE OR REPLACE FUNCTION DT_ISDATE (P_IN VARCHAR2) RETURN BOOLEAN AS I DATE;BEGIN I: = TO_DATE; RETURN TRUE;EXCEPTION WHEN OTHERS THEN RETURN FALSE;END -- determine whether it is a legitimate CREATE OR REPLACE FUNCTION DT_ISIDCARD (P_IDCARD VARCHAR2) RETURN BOOLEAN IS IDCARDLEN INTEGER;BEGIN IDCARDLEN: = LENGTH (P_IDCARD) IF (IDCARDLEN = 18 AND DT_ISNUMBER (SUBSTR (P_IDCARD, 1, IDCARDLEN-1)) AND DT_ISDATE (SUBSTR (P_IDCARD, 7,8)) OR (IDCARDLEN = 15 AND DT_ISNUMBER (SUBSTR (P_IDCARD, 1, IDCARDLEN)) AND DT_ISDATE ('19' | | SUBSTR (P_IDCARD, 7, 6)) THEN RETURN TRUE; ELSE RETURN FALSE; END IF;END DT_ISIDCARD -- get the age of the information on * and return CREATE OR REPLACE FUNCTION DT_GETAGE (P_IDCARD VARCHAR2) RETURN INTEGER ISIDCARDLEN INTEGER;IDCARDYEAR INTEGER;BEGIN IDCARDLEN: = LENGTH (P_IDCARD); IF DT_ISIDCARD (P_IDCARD) AND IDCARDLEN = 18 THEN IDCARDYEAR: = TO_NUMBER (SUBSTR (P_IDCARD) AND IDCARDLEN = 15 THEN IDCARDYEAR: = TO_NUMBER ('19' | SUBSTR)); END IF RETURN TO_NUMBER (TO_CHAR (SYSDATE,'YYYY'))-IDCARDYEAR; END DT_GETAGE
The above makes a record of the common functions used to obtain the age of * *, which is convenient for direct use in the future or for further analysis of other addresses and genders in * *.
(PS: why is the word shenfenzheng filtered out as sensitive information)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about

The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r


A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from

Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





 
             
            About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.