# Calculate age in year, month and days

**URL:** <https://forum.bubble.io/t/calculate-age-in-year-month-and-days/174931>\
**Category:** Need help\
**Created:** [October 22, 2021, 8:30am UTC](https://forum.bubble.io/t/calculate-age-in-year-month-and-days/174931 "2021-10-22T08:30:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![humbertogoveia](https://avatars.discourse-cdn.com/v4/letter/h/9dc877/32.png) [@humbertogoveia](https://forum.bubble.io/u/humbertogoveia)\
**Post date:** [October 22, 2021, 8:30am UTC](https://forum.bubble.io/t/calculate-age-in-year-month-and-days/174931/1 "2021-10-22T08:30:23Z")

</div>

How I can calculate an age cosidering year, month and days.

I’m using :  
**Current Date/time - DOB :format as days / 365 :floor** to calculate years old, but I can’t find a way to get the months and days.

Which formula should I use to get the months and days of an age?

If someone

---

<div class="post-metadata">

**Author:** ![JeffT](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jefft/32/181138_2.png) [@JeffT](https://forum.bubble.io/u/JeffT)\
**Post date:** [October 24, 2021, 9:37pm UTC](https://forum.bubble.io/t/calculate-age-in-year-month-and-days/174931/2 "2021-10-24T21:37:49Z")

</div>

Hello,

Thank you for posting on the forum.

You should be able to achieve your goal by using the [extract from date](https://manual.bubble.io/core-resources/data/operations-and-comparisons#extract-from-date) function successively for the year, month and date by subtracting one date from the other.  
It would look like this:  
 ![Screen Shot 2021-10-24 at 5.32.39 PM](https://us1.discourse-cdn.com/bubble/original/3X/e/9/e909b3b23a9071ee6f845f124356318090c53334.png)

Here is a [link to a demo](https://bubble.io/page?type=page&name=date&id=bubble-user-demo&tab=tabs-1) where I have tested this.

Please do let us know if you have any further questions.

Best,

---

<div class="post-metadata">

**Author:** ![humbertogoveia](https://avatars.discourse-cdn.com/v4/letter/h/9dc877/32.png) [@humbertogoveia](https://forum.bubble.io/u/humbertogoveia)\
**Post date:** [October 25, 2021, 1:09am UTC](https://forum.bubble.io/t/calculate-age-in-year-month-and-days/174931/3 "2021-10-25T01:09:09Z")

</div>

Thank you for your reply Jeff.  
I’ve tried it and haven’t work for the months.

I need to consume the DOB from the database, and the current date as Current Date/time option.

![image](https://us1.discourse-cdn.com/bubble/original/3X/8/0/8082000b73892f397caf3da15b8f000f6294154c.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [December 31, 2021, 8:30am UTC](https://forum.bubble.io/t/calculate-age-in-year-month-and-days/174931/4 "2021-12-31T08:30:42Z")

</div>

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