Calculate age on a certain date in the future based on DOB field [RESOLVED]

Dears,

We have a school admission form that shall calculate applicant age by certain date in the future (01/10/2022) for example based on his/her DOB field. The age should be very accurate to include years - months - days.

For example: if DOB is (25/11/2014) then his calculated age by (01/10/2022) should be (7 years 10 months 6 days)

I used this website to calculate the age in the above example: Age Calculator

GP Date Time Calculator is not accurate it just shows me number of years so the result for the above example using this plugin will be (8 years).

So is there a way to get this done.

Regards.

Hi Ahmed. Have you contact Gravity Wiz for assistance with their plugin?

We came up with a solution that uses Populate Anything and a snippet that adds diff merge tag modifiers.

David made a video walking through how everything works.

And here’s the snippet. Just copy and paste this into your theme’s functions.php file.

Hello Scott,

Thank you all for your hard work and effort. It works great out of the box. Thank you once more.

Regards.

1 Like
© 2008 - 2021. Gravity Forms is a project by Rocketgenius Inc.