Jump to content

Calculate Age


completepro1-1602803676

Recommended Posts

completepro1-1602803676

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 by completepro1-1602803676
Spelling
Link to post

This section is only visible with a valid subscription. If you have a valid subscription, please login.

Link to post
completepro1-1602803676

This section is only visible with a valid subscription. If you have a valid subscription, please login.

Link to post
completepro1-1602803676

This section is only visible with a valid subscription. If you have a valid subscription, please login.

Link to post

This section is only visible with a valid subscription. If you have a valid subscription, please login.

Link to post
completepro1-1602803676

This section is only visible with a valid subscription. If you have a valid subscription, please login.

Link to post
completepro1-1602803676

This section is only visible with a valid subscription. If you have a valid subscription, please login.

Link to post
completepro1-1602803676

This section is only visible with a valid subscription. If you have a valid subscription, please login.

Link to post

This section is only visible with a valid subscription. If you have a valid subscription, please login.

Link to post
×
×
  • Create New...