Home > database >  Pb id according to the calculation of age birthdays
Pb id according to the calculation of age birthdays

Time:10-26



As shown in figure, in pb data window freeform input id number, I want to make it automatically jump out of the age and birthday, could you tell me how to handle this, I only know that in itemchanged write code, but my birthday is a datetime type of grid, identity card number is of type string, a great god, please guide how to write

CodePudding user response:

Setitem (row, date, the date (string (mids (' id ', 7, 8), '@ @ @ @ @ @ - @ @')))

CodePudding user response:

First, you have to get enough length id number
Then, from (date) (month) (year), converts datatime type, assigned to your birthday text box
Later, through the system time, and you get a birthday to calculate difference, namely age, assigned to the age of the text box

You worry, just look for the string and conversion of the datetime to go,

CodePudding user response:

1/f, positive solutions, setitem (row, "date", the date (string (mids (' id ', 7, 8), '- dd yyyy - mm)))

CodePudding user response:

Or: setitem (row, "date", the date (integer (mid (' id ', 7, 4 ')), an integer (mid (' id '11, 2')), an integer (mid (' id number, 13, 2 ')))

CodePudding user response:

Consider the difference between 15 and 18 id card
  • Related