Obtain date of birth based on ID number
How to automatically obtain the date of birth according to the ID card number, as long as you know that the 7th to 14th of the ID card is the date of birth, you can obtain it.
After knowing the rules for writing ID numbers, we can extract useful information.
1. Interception method
The interception method is to cut the 7th digit to the 14th digit according to the format of year, month and day, use "-" splicing, and then write the calculation formula:
The following code can be directly copied to the formula editor,Note that the ID card field is replaced..
{"text":"IF(EQ(LEN(身份证号),18),CONCATENATE(MID(身份证号,7,4),\"-\",MID(身份证号,11,2),\"-\",MID(身份证号,13,2)),\"\")","marks":[{"from":{"line":0,"ch":10,"sticky":null},"to":{"line":0,"ch":16,"sticky":null},"value":"textField_ksfyitkm","invalid":false},{"from":{"line":0,"ch":38,"sticky":null},"to":{"line":0,"ch":44,"sticky":null},"value":"textField_ksfyitkm","invalid":false},{"from":{"line":0,"ch":58,"sticky":null},"to":{"line":0,"ch":64,"sticky":null},"value":"textField_ksfyitkm","invalid":false},{"from":{"line":0,"ch":79,"sticky":null},"to":{"line":0,"ch":85,"sticky":null},"value":"textField_ksfyitkm","invalid":false}],"isCmData":true}
- IF
- EQ(value1,value2) returns true when two values are equal. It supports numbers and dates.
- LEN(text):Returns the number of characters in a text string.
- CONCATENATE(text1,[text2], ...):Merge multiple text strings into one text string
- MID(A,B,C): in A string, C characters are retrieved from bit B.
- VALUE(text): converts text to numbers
Calculate date of birth
2. Video demonstration
Automatic date of birth video demonstration
3. For more information about identity, please read the document.👇:
1.Automatically calculate province based on ID number
2.Automatically calculate gender based on ID number
3.Automatically calculate constellation based on ID number
4.Automatically calculate zodiac signs based on ID number
YIDA in order to better optimize the content and quality of YIDA user manual, it takes you 3-5 minutes to fill in the document feedback questionnaire. The document feedback questionnaire is submitted anonymously, and the questionnaire information is only used for YIDA document experience feedback collection. Thank you for your support for YIDA!
-------------------- Get the latest information YIDA, welcome to follow US--------------------