Calculate 'x Years y Months' beetween two dates

Please help, my brain is stuck. I have searched from the forum’s topics but haven’t find any solution yet. In my mind, it is so simple yet i really have no idea how to do it. I am building a job portal where it should calculates total years and months of user job experience. For example, if I select two dates from the date picker (start to end): january, 2022 to july 2023, the calculation should be written as ‘1 years 7 months’, instead of ‘1 years 19 months’.


I am roughly 2 months learning bubble, please help me Bubbler Experts. Thank you so so much!

Hi there, @anpuri… it may not be perfect (like literally down to the day in some cases), but I tested these expressions, and they appear to do the trick.

dates

Oh, and you might need to enable the experimental parentheses feature on the Settings >> Versions tab (I didn’t try to create the expressions without the feature enabled).

Hope this helps.

Best…
Mike

2 Likes

Hi @mikeloc , thank you for your response. I gave it a try, and it worked like magic! You truly are a genius. I’m impressed that it even works without enabling the experimental parentheses feature. Thank you once again for your big help. Good day!

1 Like