# Checking age of the user of the application (dynamically)

**URL:** <https://community.triggre.com/t/checking-age-of-the-user-of-the-application-dynamically/104>\
**Category:** Support\
**Tags:** dates, calculations\
**Created:** [March 26, 2020, 8:26pm UTC](https://community.triggre.com/t/checking-age-of-the-user-of-the-application-dynamically/104 "2020-03-26T20:26:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Unknown](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.triggre.com/unknown/32/31_2.png) [@Unknown](https://community.triggre.com/u/Unknown)\
**Post date:** [March 26, 2020, 8:26pm UTC](https://community.triggre.com/t/checking-age-of-the-user-of-the-application-dynamically/104/1 "2020-03-26T20:26:00Z")

</div>

Hi,

Totally new here and I’m sure there is an easy way to do this:

I am building an application to automate parts of the creation of a Will (‘testament’). It is only possible to create a Will if you are older than 21 years. So, I want to create a rule to test if a person is older than 21. The applicant already has given me his or her day of birth, so I do have access to that data/information. Now, what would be the easy way to calculate the age of the applicant? I have been fiddling around with dates but I can’t find an easy way to do it. (‘Geboortedatum’ means ‘day of birth’)

 ![iznc05wo6p0gdhie8f16wnl1w8hzlilz1](https://canada1.discourse-cdn.com/flex035/uploads/triggre/original/1X/7c76c549a649d050b930ea359a7532dc6874d214.jpeg)

See the screenshot above to explain my issue. (‘Geboortedatum’ means ‘day of birth’)

I am going to **VALIDATION RULE** since I want to check the age and give an announcement if the applicant is too young. (is that my mistake?)

**ADD CONTENT** =\> Current date – Day of birth \> **+**

**TYPE** : specific content

**SPECIFIC DATE** : that is **not** what I want, I want to simply fill out _21 years_ . Not a date. I simply want to subtract _date A_ minus _date B_ and see if there are more than 21 years between those two dates. How do I do that?

---

<div class="post-metadata">

**Author:** ![Triggre](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.triggre.com/triggre/32/14_2.png) [@Triggre](https://community.triggre.com/u/Triggre)\
**Post date:** [March 26, 2020, 8:26pm UTC](https://community.triggre.com/t/checking-age-of-the-user-of-the-application-dynamically/104/2 "2020-03-26T20:26:58Z")

</div>

Hi Paul,

I think I could help you with this. Triggre has a standard function that you can use, called “add n years to A”. Therefore you can add, for example, 21 years to your birth date. When the current date is greater than your birthdate + 21 years, this means that you are older than 21.

![74rgzdqncbl3o4jjldlccmfy200zeu221](https://canada1.discourse-cdn.com/flex035/uploads/triggre/original/1X/ea3febb7d330a6816e02742177ef9fa66c638509.png)

I added this into your user flow.

Does this help?

---

<div class="post-metadata">

**Author:** ![Jesse](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.triggre.com/jesse/32/88_2.png) [@Jesse](https://community.triggre.com/u/Jesse)\
**Post date:** [March 26, 2020, 8:28pm UTC](https://community.triggre.com/t/checking-age-of-the-user-of-the-application-dynamically/104/3 "2020-03-26T20:28:09Z")

</div>

We also now have an article on our knowledge base about this, which goes into a lot of depth of how to make age calculations:

[https://www.triggre.com/knowledge-base/tips-tricks/flows/how-to-calculate-age](https://www.triggre.com/knowledge-base/tips-tricks/flows/how-to-calculate-age)
