You are viewing limited content. For full access, please sign in.

Question

Question

Formula to calculate age based on birthday within a table.

asked on November 1, 2016

I am using Forms 10.1 and I understand calculations within tables are supported.  However, I would like to know if this particular calculation is supported and if so, how would you build the formula?  I have it working using individual fields in a form using the "DATEDIF" fx but I can't quite get it to work using it within a table.

Table would have two columns, one for birthday and the other for age.  I would like to build the formula to calculate the current age based on the birthday in each row.

0 0

Replies

replied on November 1, 2016 Show version history

Hi Jeff,

Assuming you're using M/d/yyyy format (I've tested other formats and they worked fine as well), you can run the DATEDIF calculation against a "Today's Date" field (I just used the "today" default value) outside of the table:

 

The formula in the Current Age field (selecting the variables in the formula builder, your variables may differ) is:

=DATEDIF(INDEX(People.Birthday,ROW()),Todays_Date,"y")

I also set the Birthday field Year Range to 100-0 for ease of use

Hopefully this sorts it for you.

Cheers,

Mike

1 0
replied on November 2, 2016

Exactly what I needed, much thanks!!!

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.