Age calculation in Survey 123 Connect from months and days

210
4
04-12-2024 11:36 AM
Pedrovoliveira
New Contributor II

Hello community,

I would like to know if it is possible to calculate a person's age using months and days as a result. For example, Isabela is 25 months and 2 days old.

Tags (1)
0 Kudos
4 Replies
abureaux
MVP Regular Contributor

Short answer is "yes".

But, depends on how the data is collected. E.g.,

abureaux_0-1713282945865.png

 

abureaux
MVP Regular Contributor

Sorry. Only realized as I hit submit what you were asking for.

The answer is still "yes", but that would require a lot more effort.

If you are set on months and days as the output, JS is likely the best approach (example). It is possible in S123, but would involve convoluted calculates.

Raul
by
New Contributor III

The example posted is in java, not javascript 😬

Anyway, as you mentioned the possible solution is far more complex than it seems, because of leap years, months not being units of equal measurement in time, and other complexities some folks have outlined before.

0 Kudos
Pedrovoliveira
New Contributor II

Thanks for the feedback. I also have this feeling, due to S123 the complexity of this calculation will be great. I will study this way using VScode. If I get a positive result, I will send it to you. I believe other people have already encountered this situation.

0 Kudos