-
CNSTradingLtdAsked on March 16, 2017 at 3: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
-
MikeReplied on March 16, 2017 at 5: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.
-
CNSTradingLtdReplied on March 21, 2017 at 3:06 PM
Hi
https://forme is on .jotformeu.com/70746410531348
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?
-
CNSTradingLtdReplied on March 21, 2017 at 3: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.
-
MikeReplied on March 21, 2017 at 5: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.
-
CNSTradingLtdReplied on March 22, 2017 at 7: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.
-
CNSTradingLtdReplied on March 22, 2017 at 7:11 AM
I mean for someone born on 31/08/1999
-
CNSTradingLtdReplied on March 22, 2017 at 7:20 AM
I think its to just change 17044 to 17043 ?
-
Welvin Support Team LeadReplied on March 22, 2017 at 12:47 PM
I'm not sure if that will work, but please try it and let us know any instance that the method won't give you a correct result.