Convert Date of Birth to Number of Month


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.


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

1 Like

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

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

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