Automatically calculate age based on ID number
1. Create a form
Create a common form, add a single line of text to enter the ID number, and a numeric component to obtain information, as shown in the following figure:
Form editing page
2. How to obtain age based on ID card
Determine whether the ID card information is 18 bits before calculating. Obtain the information of the birth year in the ID number and the year of the current time for calculation, and obtain the age. Because the result data type of the LEFT(), RIGHT(), TEXT() functions is a string, to calculate, you need to convert VALUE() to a VALUE.
Description: The 7-10th ID card is the information of the year of birth.
The following code can be directly copied to the formula editor,Note that the ID card field is replaced..
{"text":"IF(EQ(LEN(身份证),18),VALUE(TEXT(TODAY(),\"yyyy\"))-VALUE(RIGHT(LEFT(身份证,10),4)),\"\")","marks":[{"from":{"line":0,"ch":10,"sticky":null},"to":{"line":0,"ch":15,"sticky":null},"value":"textField_kn8841dw","invalid":false},{"from":{"line":0,"ch":66,"sticky":null},"to":{"line":0,"ch":71,"sticky":null},"value":"textField_kn8841dw","invalid":false}],"isCmData":true}
3. Video case
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--------------------