Phenomenal plugin! I use so many formulas in my app that this plugin solves so many of my mathematical needs…but dates can be a bear to work with, in Bubble as well as Excel.
Although I struggled with YEARFRAC to use in place of a missing “hidden” Excel function called DATEDIF the difficulty had to do with the formatting of the dates that Bubble hands off to the formulas more than anything else. This is good method for finding the difference between two dates in Months or Years…not so good with Days, at least not that I was able to determine.
To make YEARFRAC work you need to serialize the dates, as they are in Excel, and with this plugin, you can do that with DATEVALUE which converts dates to a serialized number. However DATEVALUE serializes TEXT values, and in Bubble, Dates are NUMBERS (at least as far as the plugin is concerned) so it is critical that you use quotes surrounding the field names. This presents the date NUMBER as a TEXT value to the function in order to work properly. In Excel the date field would be formatted as TEXT for the formula to work, in Bubble you need to convert it with quotes.
The final solution looks like this. This solves for months, remove the *12 if you need years: