Hi, is there a simple expression for counting the number of months between two dates? Specifically, I’m looking to calculate the number of months between Now() and a specified EndDate.
Thanks
Hey Dave.
Not specifically, but you can use TOTALHOURS() to find the number of hours that’s passed, then use that with some math to find the total number of months - but that’s not going to be exact.
Hmmm… I can’t think of any easy way to do this, my mind keeps going to things like: we’ll need to construct a multi-layered IF() statement to handle different situations. Like… if it’s been over a year, or years, then we need to:
Deeper layered things like that to cover all the bases.
I’m always surprised at how seemingly simple solutions quickly become complex. I found this on the AppSheet help archive. It seems to describe what I need, but I’m not clear on using year as a virtual column or what the app formula for that would be.
Haven’t tested, but something like this should work…
ABS(((YEAR(NOW())-YEAR([Date]))-1)*12+MONTH(NOW())+(12-MONTH([Date])))
I’ll give that a shot, thanks!
User | Count |
---|---|
61 | |
25 | |
14 | |
11 | |
6 |