Forum Academy Marketplace Showcase Pricing Features

Number of month between two dates

Hi
I want to know if there is a way to get the number of month between two dates. Bubble can only give the result as days, hours, minutes and second or if there is a plugin (free or not) that can help me do that.
I could have divide the number by 30 but it is not always exact and I need precision in this case

This video may help https://m.youtube.com/watch?v=f6vcEq5ASQs

1 Like

There’s an easy way, but if one date is at September 29 and the other is October 1st, this will result in “1”, is that what you want?
You can the the “extract” thing, so let’s say you have two dates, DATE1, and DATE2, being DATE2>DATE1, you can make

DATE2:extract(year) - DATE1:extract(year)*12 +DATE2:extract(month) - DATE1:extract(month)

1 Like

Many thanks !!!
It seems to be the right solution !!!