completepro1-1602803676 Posted June 24, 2021 Share Posted June 24, 2021 (edited) Hello Alejandro: I'm trying to implement some PHP code you shared to calculate someone's age from their date of birth. Below is the code; $bday = new DateTime($text); $today = new DateTime(); $diff = $today->diff($bday); return $diff->y; I have a field for the date of birth {jr_dateofbirth}. Do I need to create a banner field like {jr_age} to display the results? How do I format the code to make it work for the fields I am using? I hope I made sense in what I'm trying to acheive. Thanks Law Edited June 24, 2021 by completepro1-1602803676 Spelling Link to comment
Alejandro Posted June 24, 2021 Share Posted June 24, 2021 This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
completepro1-1602803676 Posted June 24, 2021 Author Share Posted June 24, 2021 This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
completepro1-1602803676 Posted June 24, 2021 Author Share Posted June 24, 2021 This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
Alejandro Posted June 24, 2021 Share Posted June 24, 2021 This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
completepro1-1602803676 Posted June 24, 2021 Author Share Posted June 24, 2021 This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
completepro1-1602803676 Posted June 24, 2021 Author Share Posted June 24, 2021 This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
completepro1-1602803676 Posted June 24, 2021 Author Share Posted June 24, 2021 This section is only visible with a valid subscription. If you have a valid subscription, please login. Alejandro 1 Link to comment
Alejandro Posted June 24, 2021 Share Posted June 24, 2021 This section is only visible with a valid subscription. If you have a valid subscription, please login. Link to comment
Recommended Posts