Simplicty and flexibility!


Calculating Number of Months


Started by matarusetafadzwa@yahoo.com
Search
You will need to Sign In to be able to add or comment on the forum!

Calculating Number of Months

Can you please assist me with a formula to calculate number for months say from 01/05/1999 to 31/08/2025


Written by matarusetafadzwa@yahoo.com 13/02/25 at 13:38:17 DataEase 8.5 Runtime

Re:Calculating Number of Months


Depends how accurate you want it.

You can just take one date and subtract the other and divide by 30.5 



Written by DataEase 17/02/25 at 16:27:41 DataEase 8.5 Runtime

Re:Re:Calculating Number of Months

... assumes stop-date >= start-date

if year(stop-date) = year(start-date)
then Months = month(stop-date) minus month(start-date) plus 1

else Months =
12 minus month (start-date) plus 1 ... beginning stub
(year(end-date) minus year(start-date)) times 12 ... great middle
month (stop-date) ... ending stub
end if

Per example ...

... 12 -5 +1 = 8
... plus (2025 - 1999) *12 = 26 * 12 = 312
... plus 8
... total is 328 months


Written by Suzanne Michelle 20/03/25 at 15:38:26 DataEase 8.5 Runtime

Re:Re:Re:Calculating Number of Months

not bad


Written by Ihor Zakharchenko 21/03/25 at 12:24:35 DataEase 8.5 Runtime
DG3_ForumList