# Convert Date of Birth to Number of Month

**URL:** <https://forum.adalo.com/t/convert-date-of-birth-to-number-of-month/37114>\
**Category:** Get Help\
**Created:** [March 13, 2023, 8:00am UTC](https://forum.adalo.com/t/convert-date-of-birth-to-number-of-month/37114 "2023-03-13T08:00:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ajax](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/ajax/32/10145_2.png) [@Ajax](https://forum.adalo.com/u/Ajax)\
**Post date:** [March 13, 2023, 8:00am UTC](https://forum.adalo.com/t/convert-date-of-birth-to-number-of-month/37114/1 "2023-03-13T08:00:46Z")

</div>

Guys,

I really need some help with the following scenario:

I am capturing the Date of Birth (dd/mm/yyyy) of the User at Signup using the date picker component.

I would like to convert the Date of Birth into MONTHS and then save this in the user’s data. Every time a user opens the app, I want this calculation to run, comparing the DOB in months with the current date so that the record remains updated.

For ex. If the DOB is 13th March 2022, the ‘Months’ should be 12, if the check is run today.

I have searched the forum but was unable to determine the conversion formula/math to achieve this. Any help would be appreciated.

Thanks  
Arpit

---

<div class="post-metadata">

**Author:** ![GrantWoods](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/grantwoods/32/28251_2.png) [@GrantWoods](https://forum.adalo.com/u/GrantWoods)\
**Post date:** [March 13, 2023, 5:14pm UTC](https://forum.adalo.com/t/convert-date-of-birth-to-number-of-month/37114/2 "2023-03-13T17:14:34Z")

</div>

You can use zapper JavaScript Code and ChatGBT to Write your code and put it on zapper then you send a request to zapper with 12/4/22 and it will reply with 4 or if you have the javascript component you can do it inside your app for free

---

<div class="post-metadata">

**Author:** ![Ajax](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/ajax/32/10145_2.png) [@Ajax](https://forum.adalo.com/u/Ajax)\
**Post date:** [March 14, 2023, 3:46pm UTC](https://forum.adalo.com/t/convert-date-of-birth-to-number-of-month/37114/3 "2023-03-14T15:46:26Z")

</div>

This was a dumb question after all. Figured out the answer:

ROUND(((Current time - DOB)/365)\*12)

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/system/32/40401_2.png) [@system](https://forum.adalo.com/u/system)\
**Post date:** [March 24, 2023, 3:47pm UTC](https://forum.adalo.com/t/convert-date-of-birth-to-number-of-month/37114/4 "2023-03-24T15:47:05Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
