Calculating Exact age

Sorry to open new topic about this again. But still don’t find answers yet even with the previous threads.

How do we calculate exact age?

First option I did is calculate age by this:
“Current date:extract yeat - DOB:extract year”

However, when patient’s birth month is higher than the current month, the age becomes wrong:

DOB: Sep 2, 2018
CurrentD: Aug 21, 2019
Age: 1
But it must be 0.

I put a condition wherein if the “DOB:extract month > Current Date:extract month”, then change text to “CurrentD:extract year - DOB:extract year - 1”

The example becomes correct

However another scenario is if DOB and current date has the same month but DOB has greater day. Even with the condition above, calculation is not be affected.

DOB: Aug 28, 2018
CurrentD: Aug 21, 2019
Age: 1
But it must be 0

Any workaround here?


It’s simpler:

Current date/time - DOB:format as days / 365:floor


Thank you very much! It worked. :smiley:

This topic was automatically closed after 70 days. New replies are no longer allowed.