Domino Code Fragment

Code Name*
Calculate total months between a StartDate and Today (- current month)
Date*
04/28/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.3.144.238.20
Description*
Possible use: To get total months an employee worked for a company to calculate vacation.
Type*
Formula
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
startMonth := @If(@Day(StartDate) > 14; @Month(StartDate) + 1; @Month(StartDate));
firstYear := 12 - startMonth;
thisyear := (@Month(@Date(@Now)) - 1);
betweenYears := ((@Year(@Now) - @Year(EPStartDate)) -1) * 12;
firstYear + betweenYears + thisYear