Hi all,
Is there a way to calculate the number of months between today and a specified date?
Let’s say I want to calculate the number of months between today and 1st of January 2018, what should be the expression for that?
Thank you.
I would take a look at this very good write up. The examples lower in the article show exactly how to calculate months or days. See if this helps:
@djmalaka
You can basically use this expression:
FLOOR(
(HOUR([End Date] - [Start Date])/24 - MOD(HOUR([End Date] - [Start Date])/24,30))/30
)
It worked Great!!! Thank you very much. Would you mind telling me what the MOD expression does? I read on it, but couldn’t exactly grasp what it does.
Thanks again!
@djmalaka
MOD basically calculates the mathematical remainder of a dividend/divisor
operation.
A division operation can be mathematically described as:
dividend = divisor x quotient + remainder (1)
Hence, from (1) the quotient can be calculated as:
quotient = (dividend - remainder) / divisor
User | Count |
---|---|
43 | |
26 | |
23 | |
14 | |
12 |