# Creating age calculator form

Asked on March 16, 2017 at 03:32 PM

I would like to calculate a persons age on a particular date.

IE. How old, in an integer was someone on 31/08/2016 ?

Sure it's simple, but got a bit of brain fade at the moment.

Thanks

Robert

• Mike
Answered on March 16, 2017 at 05:52 PM

Your formula looks correct, the only thing I am not sure is the -1 operation from the calculated age.

In case you need to round down calculated age (e.g. 33.7 to 33) it is possible to use a floor() function in formula.

If you need any further assistance on this, please let us know. We will be happy to help.

Answered on March 21, 2017 at 03:06 PM

Hi

As I said, I need to know how old someone was on 31/08/2016 form their DOB.

It works fine for someone born in 1999 and some other years but not for all years.

Could be a leap year problem?

Any ideas?

Answered on March 21, 2017 at 03:16 PM

Just to make clear what I mean.

Someone born on or after 31/08/1999 should give an age of 16

Someone born before 31/08/1999 (30/08/1999 and before should give an age of 17

If you test, this works fine for someone born in 1999 but is out by a couple of days

for other years.

• Mike
Answered on March 21, 2017 at 05:10 PM

You may try the next formula for more precision result, where 17044 value represent the 31/08/2016 date.

The 31/08/1999 DOB should give an age of 17 if I am not missing anything.

Here is a test form:

https://form.jotformpro.com/70796253970971

Thank you.

Answered on March 22, 2017 at 07:05 AM

Hi

This looks great.

One thing, the age returned on the 31/08/2016 should be 16 not 17.

Just so you know what this is for.

In UK Junior cricket, someone can play in an Under 16 league if they are 16 or under on 31/08/2016.

Any chance you could amend.

Many thanks.